Skip to content

Commit fa1081c

Browse files
cpsauercopybara-github
authored andcommitted
Filter libtool warning about table of contents
The warning is unlikely to indicate a real issue, and Bazel already silences parallel warnings with `-no_warning_for_no_symbols`. For more context, see #4057 Fixes #4057 Closes #15325. PiperOrigin-RevId: 446659148
1 parent 4858cbf commit fa1081c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tools/objc/libtool.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,22 @@ if [ -z ${MY_LOCATION+x} ]; then
3232
fi
3333
fi
3434

35-
WRAPPER="${MY_LOCATION}/xcrunwrapper.sh"
35+
function invoke_libtool() {
36+
# Just invoke libtool via xcrunwrapper
37+
"${MY_LOCATION}/xcrunwrapper.sh" libtool "$@" \
38+
2> >(grep -v "the table of contents is empty (no object file members in the"`
39+
`" library define global symbols)$" >&2)
40+
# ^ Filtering a warning that's unlikely to indicate a real issue
41+
# ...and not silencable via a flag.
42+
}
3643

3744
if [ ! -f "${MY_LOCATION}"/libtool_check_unique ] ; then
3845
echo "libtool_check_unique not found. Please file an issue at github.com/bazelbuild/bazel"
3946
exit 1
4047
elif "${MY_LOCATION}"/libtool_check_unique "$@"; then
4148
# If there are no duplicate .o basenames,
4249
# libtool can be invoked with the original arguments.
43-
"${WRAPPER}" libtool "$@"
50+
invoke_libtool "$@"
4451
exit
4552
fi
4653

@@ -131,4 +138,4 @@ for arg in "$@"; do
131138
done
132139

133140
printf '%s\n' "${ARGS[@]}" > "$TEMPDIR/processed.params"
134-
"${WRAPPER}" libtool "@$TEMPDIR/processed.params"
141+
invoke_libtool "@$TEMPDIR/processed.params"

0 commit comments

Comments
 (0)