-
Notifications
You must be signed in to change notification settings - Fork 4.4k
cc_proto_library doesn't get linked for binary with dynamic_deps #17091
Copy link
Copy link
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: bug
Description
Description of the bug:
Because cc_proto_library doesn't use deps for linking dependencies, it's never part of GraphNodeInfo.
This happens even the cc_binary has empty list of dynamic_deps
As a result,
| (link_statically_labels, link_dynamically_labels) = _separate_static_and_dynamic_link_libraries(graph_structure_aspect_nodes, can_be_linked_dynamically) |
| if owner not in link_dynamically_labels and (owner in link_statically_labels or str(ctx.label) == owner): |
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 returns development 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: bug