-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Avoid deduplicating linkopts of cc_shared_library dependencies. #27755
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
afd371f to
65bf666
Compare
fmeum
left a comment
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.
|
@bazel-io fork 9.0.0 |
|
@katzdm Could you please take a look at the failing checks? |
|
@bharadwaj08-one Please see the explanation in the PR description:
|
Linker inputs for dependencies of
cc_shared_libraryare currently passing theirlinkoptsas adepset, which leads to deduplication of the flags thereby passed. Consequently, a sequence of well-formed flags like-framework Security -framework IOKitgets collapsed to-framework Security IOKit; the linker then interpretsIOKitas an object file that it's unable to locate, which yields a malformed link line.Passing
linkoptsdirectly rather than wrapping it indepsetappears to resolve the issue. I've added a test that replicates the original issue; since-frameworkisn't meaningful on all platforms, I've only enabled it for MacOS.Note that the tests in this repository utilize the
rules_ccrepository rather than the built-in rules; therefore, I don't think the new test can be expected to pass until the change has been propagated there, and the controllingMODULE.bazel.lockentry has been updated. I've tested it locally bycating alocal_path_overridedirective to theMODULE.bazelfile that gets synthesized for these tests, in order to point the tests towards a local fork ofrules_ccwith this same change applied; under these conditions, the test passes.Closes #27735.