-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature definition for static_link_cpp_runtimes
in unix cc toolchain config
#17391
Conversation
The added feature is disabled by default to avoid negative impacts, and can be enabled on demand.
Hi @yuzhy8701, Could you please fix the above buildkite checks. As the PR is awaiting to merge. Thanks! |
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? |
No. This PR only defines the feature, but does not add the |
…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
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
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
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.