-
Couldn't load subscription status.
- Fork 139
Pass -no_warning_for_no_symbols flag to libtool on macos #503
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
Conversation
This was the default in Bazel before starlarkification, and also the default in apple_support now.
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.
Two notes:
- IMO should do this, it makes the behavior of libtool closer to ar. 👍
- I haven't met anyone that feels this error is worth leaving enabled, but it still might be good to file bugs against or fix the sites you've encountered that do this. Status quo is not to create a linking context if no files are being compiled. bazelbuild/bazel#18095
| name = "no_warning_for_no_symbols", | ||
| actions = ["//cc/toolchains/actions:ar_actions"], | ||
| args = select({ | ||
| ":use_libtool_on_macos_setting": ["-no_warning_for_no_symbols"], |
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.
Nit: -no_warning_for_no_symbols can be moved into create_static_archive below, next to -static.
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.
Thanks for the review. I'll move that down. There is also the -D which sets default to userid, groupid, modes etc.. I can make a second PR for that.
| name = "no_warning_for_no_symbols", | ||
| actions = ["//cc/toolchains/actions:ar_actions"], | ||
| args = select({ | ||
| ":use_libtool_on_macos_setting": ["-no_warning_for_no_symbols"], |
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.
instead of creating a separate cc_args for this i would just include this with -static below
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.
Done
This was the default in Bazel before Starlarkification.