Skip to content

Conversation

@cerisier
Copy link
Contributor

This was the default in Bazel before Starlarkification.

This was the default in Bazel before starlarkification, and also
the default in apple_support now.
Copy link
Collaborator

@armandomontanez armandomontanez left a 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"],
Copy link
Collaborator

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.

Copy link
Contributor Author

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"],
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants