forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the static_deps attribute from cc_shared_library.
The idea behind this attribute was to force a user creating a shared library to account for every library that was linked statically into it, so that a new dependency further upstream wouldn't end up being linked without previous approval from the shared library owner. However, in the real world this attribute has turned out to be more of a pain than useful for users. Users will wildcard as much as possible using the @repo_name//:__subpackages__ syntax and will often get errors due to a new dependency from a different repository. At the same time, if any users (haven't seen any so far) have any interest in this restriction where an allowlist is required for libraries linked statically, then they can still do so by either writing a Starlark test which looks at the CcSharedLibraryInfo provider (which is public API) or they can write a test that reads the targets written to the debug *_link_once_static_libs.txt files. With this change the static_deps attribute will still be present but it will be a no-op as long as you are using the --experimental_cc_shared_library flag. Using the attribute will be an error without the experimental flag. In a follow up change we will not require the experimental flag to use the rule. Some time later the flag will be removed (therefore the static_deps attribute should be removed from targets). RELNOTES[inc]: cc_shared_library.static_deps attribute is removed PiperOrigin-RevId: 505107353 Change-Id: I438a1e47451ac53375dbe7940f238473807a0acc
- Loading branch information
1 parent
9234250
commit 9815b76
Showing
3 changed files
with
63 additions
and
127 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
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