-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter libtool warning about table of contents #15325
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,15 +32,22 @@ if [ -z ${MY_LOCATION+x} ]; then | |
fi | ||
fi | ||
|
||
WRAPPER="${MY_LOCATION}/xcrunwrapper.sh" | ||
function libtool() { | ||
# Just invoke libtool via xcrunwrapper | ||
"${MY_LOCATION}/xcrunwrapper.sh" libtool "$@" \ | ||
2> >(grep -v "the table of contents is empty (no object file members in the"` | ||
`" library define global symbols)$" >&2) | ||
Comment on lines
+38
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this grep not matching cause an unexpected failure? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you could also be less strict here if you wanted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When running, I'm seeing things succeed fine when the grep doesn't match. Does that resolve the concern? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I kinda like the full thing to self-document the warning, but can remove if you want.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that resolves the concern, I was worried grep would still error. it looks like it's because of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, I think so. I was concerned about that, too, when writing |
||
# ^ Filtering a warning that's unlikely to indicate a real issue | ||
# ...and not silencable via a flag. | ||
} | ||
|
||
if [ ! -f "${MY_LOCATION}"/libtool_check_unique ] ; then | ||
echo "libtool_check_unique not found. Please file an issue at github.com/bazelbuild/bazel" | ||
exit 1 | ||
elif "${MY_LOCATION}"/libtool_check_unique "$@"; then | ||
# If there are no duplicate .o basenames, | ||
# libtool can be invoked with the original arguments. | ||
"${WRAPPER}" libtool "$@" | ||
libtool "$@" | ||
exit | ||
fi | ||
|
||
|
@@ -131,4 +138,4 @@ for arg in "$@"; do | |
done | ||
|
||
printf '%s\n' "${ARGS[@]}" > "$TEMPDIR/processed.params" | ||
"${WRAPPER}" libtool "@$TEMPDIR/processed.params" | ||
libtool "@$TEMPDIR/processed.params" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably worth naming this something slightly different to avoid confusion that we're calling
libtool
directly, maybelibtool_func
(or ideally something better)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would
invoke_libtool
be okay?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good