Add feature definition for static_link_cpp_runtimes in unix cc toolchain config#17391
Closed
yuzhy8701 wants to merge 2 commits intobazelbuild:masterfrom
yuzhy8701:unix-cc-toolchain
Closed
Add feature definition for static_link_cpp_runtimes in unix cc toolchain config#17391yuzhy8701 wants to merge 2 commits intobazelbuild:masterfrom yuzhy8701:unix-cc-toolchain
static_link_cpp_runtimes in unix cc toolchain config#17391yuzhy8701 wants to merge 2 commits intobazelbuild:masterfrom
yuzhy8701:unix-cc-toolchain
Conversation
The added feature is disabled by default to avoid negative impacts, and can be enabled on demand.
oquenchil
approved these changes
Feb 2, 2023
Member
|
Hi @yuzhy8701, Could you please fix the above buildkite checks. As the PR is awaiting to merge. Thanks! |
Contributor
Author
|
The test failures are complaining not finding python: I don't think they are related to my change - more like an infra issue. I can rebase the changes and try again. |
|
Will this PR fix #14342? |
Contributor
Author
No. This PR only defines the feature, but does not add the |
hvadehra
pushed a commit
that referenced
this pull request
Feb 14, 2023
…chain config `static_link_cpp_runtimes` is one of the well-known features - which is required if you want to link in non-default toolchain libs. However the default unix toolchain does not define it at all. This PR adds a simple definition of this feature. The added feature is disabled by default to avoid negative impacts, and can be enabled on demand. Closes #17391. PiperOrigin-RevId: 507677235 Change-Id: If149a50c1ab41dad258f706bc83df0fc09f8e6e7
Synss
added a commit
to Synss/bazel
that referenced
this pull request
Aug 3, 2024
This patch implements the `static_link_cpp_runtimes` feature in `unix_cc_toolchain_config`. The feature is documented as a well-known feature[1] and was added to the toolchain[2] but not implemented. The patch follows the solution proposed on GitHub.[3] For the feature to work as expected, users have to remove the linker flag `"-lstdc++"` from `link_libs` (or `link_flags`) from the call to `unix_cc_toolchain_config`. [1] https://bazel.build/docs/cc-toolchain-config-reference#wellknown-features [2] bazelbuild#17391 [3] bazelbuild#14342
Synss
added a commit
to Synss/bazel
that referenced
this pull request
Aug 3, 2024
This patch implements the `static_link_cpp_runtimes` feature in `unix_cc_toolchain_config`. The feature is documented as a well-known feature[1] and was added to the toolchain[2] but not implemented. The patch adapts a solution proposed on GitHub.[3] [1] https://bazel.build/docs/cc-toolchain-config-reference#wellknown-features [2] bazelbuild#17391 [3] bazelbuild#14342
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
static_link_cpp_runtimesis one of the well-known features - which is required if you want to link in non-default toolchain libs. However the default unix toolchain does not define it at all.This PR adds a simple definition of this feature. The added feature is disabled by default to avoid negative impacts, and can be enabled on demand.