-
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
cc_shared_library ignores linkopts from header only cc_library deps #21884
Comments
cc @pzembrod for triage |
Not sure what's going on, I'd set a breakpoint (or print) here: https://cs.opensource.google/bazel/bazel/+/master:src/main/starlark/builtins_bzl/common/cc/cc_shared_library.bzl;drc=2abc982ca5a8d1e829613629c8e3b44cf61b58c5;l=295 to see whether the wrapped linker_input has the flag In any case, if you want this to throw an error I'd look first around that code I linked. |
@bazel-io fork 7.4.0 |
fix PR is here #23215 |
Fixes bazelbuild#21884 Fixes bazelbuild#23053 Closes bazelbuild#23215. PiperOrigin-RevId: 686518093 Change-Id: I1a6699b169fe4291ad0dda3be7e74f38c8e37bf1
@bazel-io fork 8.0.0 |
Fixes bazelbuild#21884 Fixes bazelbuild#23053 Closes bazelbuild#23215. PiperOrigin-RevId: 686518093 Change-Id: I1a6699b169fe4291ad0dda3be7e74f38c8e37bf1
Fixes bazelbuild#21884 Fixes bazelbuild#23053 Closes bazelbuild#23215. PiperOrigin-RevId: 686518093 Change-Id: I1a6699b169fe4291ad0dda3be7e74f38c8e37bf1
A fix for this issue has been included in Bazel 7.4.0 RC3. Please test out the release candidate and report any issues as soon as possible. |
Description of the bug:
With this example:
The cc_binary target fails to build, but the cc_shared_library doesn't, it ignores the invalid
-blah
linkopt. If you add an empty cpp file tobaz
it works correctly.Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
macOS
What is the output of
bazel info release
?7.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: