-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
additional_linker_inputs
option to cc_library
rule
This is achieved by the following related changes: 1) Moving the `additional_linker_inputs` attribute up from the `cc_binary_base` rule to the `cc_rule`. The rationale here is that any rule that allows `linkopts` to be set should also support `additional_linker_inputs`. 2) Adding the `additional_linker_inputs` attr to the `cc_library` rule context. This was copied verbatim from the existing `cc_binary` attribute list. 3) Appending the `ctx.files.additional_linker_inputs` list to the list of linker scripts wherever they are passed as `additional_inputs` in the `cc_library.bzl` builtin file corresponding to the `cc_library` rule. ---------------------- For context on this PR, see issue #17788 as well as the original [Google group discussion](https://groups.google.com/g/bazel-discuss/c/1VFvNBDqzVU/m/F5UmYO-RAAAJ), which inspired the feature request. Resolves #17788. Closes #18952. PiperOrigin-RevId: 557505297 Change-Id: I4811b60e102c6426697efcb202296fe77a3d5f25
- Loading branch information
1 parent
ad6d4d7
commit 0589995
Showing
2 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters