-
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_proto_library doesn't get linked for binary with dynamic_deps #17091
Comments
Actually, this bug isn't just cc_proto_libray. Using cmake rule from foreign_rules_cc also won't work. |
Hi @eagleonhill, Could you please provide minimal steps to reproduce the above issue. Thanks! |
I am unable to reproduce this for In any case, the bug report is useful, I can certainly believe this happens to the cmake for foreign_rules_cc. The problem is this PR ff927f7 which was a red-herring and not the actual reason for #16296 (comment) . We can restore the change that propagated across all attributes. Also the The cmake rule will only have to advertise CcInfo if it doesn't already. There won't be a need for any other hints. |
We can't actually have |
This is rolling forward ff927f7 which I mistakenly confused as the root cause for #16296. The implementation does have an issue with too much propagation which is fixed on this change with required_providers and required_aspect_providers restrictions on the aspect. Fixes #17091. RELNOTES:none PiperOrigin-RevId: 507457624 Change-Id: I7317c4532ef20cd7584c55aacc3eca82c50a618b
@bazel-io flag |
@bazel-io fork 6.4.0 |
@oquenchil @hvadehra @fmeum We tried to cherry-pick this to release-6.4.0, but there were some conflicts.
Can you please take a look? Thank you! cc: @bazelbuild/triage |
I put everything from head cc_shared_library into 6.3. There have been no changes to cc_shared_library since then. |
Just a heads up that 6.4.0rc1 will be cut next Monday, so this needs to be cherry-picked before then if we want to backport it into 6.4.0. |
This was done in #19534 |
Description of the bug:
Because
cc_proto_library
doesn't usedeps
for linking dependencies, it's never part ofGraphNodeInfo
.This happens even the
cc_binary
has empty list ofdynamic_deps
As a result,
bazel/src/main/starlark/builtins_bzl/common/cc/cc_binary.bzl
Line 383 in f79ec3d
bazel/src/main/starlark/builtins_bzl/common/cc/cc_binary.bzl
Line 393 in f79ec3d
I made a local workaround by removing the 2nd term, that assumes all unknown targets are staticaly linked.
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?
ubuntu
What is the output of
bazel info release
?5.2.0
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 master; git rev-parse HEAD
?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: