forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teach cc_configure about BAZEL_LINKLIBS env variable
Using this variable is will be possible to specify system libraries that should be added after default linker flags, after libraries to link, and after user link flags (i.e. after --linkopt and `linkopts` rule attribute). Flag separator is `:`, similarly to `BAZEL_LINKOPTS`. Escaping is done by `%`. Default value is empty string. With this it's possible to force Bazel to statically link `libstdc++` by using: ``` BAZEL_LINKOPTS=-static-libstdc++ BAZEL_LINKLIBS=-l%:libstdc++.a bazel build //foo ``` Fixes bazelbuild#2840. Relevant for bazelbuild#8652. RELNOTES: Bazel's C++ autoconfiguration now understands `BAZEL_LINKLIBS` environment variable to specify system libraries that should be appended to the link command line. Closes bazelbuild#8660. PiperOrigin-RevId: 253946433
- Loading branch information
Showing
4 changed files
with
11 additions
and
1 deletion.
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
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