Skip to content
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

Support optional toolchains with find_cpp_toolchain #16968

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Dec 9, 2022

Rules that want to use optional toolchains but still support builds that don't use C++ toolchain resolution should point their _cc_toolchain attribute to the new
@bazel_tools//tools/cpp:optional_current_cc_toolchain target.

Fixes #16966

@fmeum fmeum force-pushed the 16966-backwards-compatible-optional-toolchain branch from 030ce8e to ff81792 Compare January 25, 2023 10:28
@fmeum fmeum marked this pull request as ready for review January 25, 2023 11:28
@fmeum fmeum requested a review from lberki as a code owner January 25, 2023 11:28
@fmeum
Copy link
Collaborator Author

fmeum commented Jan 25, 2023

@oquenchil @katre

@katre katre requested a review from oquenchil January 25, 2023 14:45
Rules that want to use optional toolchains but still support builds that
don't use C++ toolchain resolution should point their `_cc_toolchain`
attribute to the new
`@bazel_tools//tools/cpp:optional_current_cc_toolchain` target.
@fmeum fmeum force-pushed the 16966-backwards-compatible-optional-toolchain branch from ff81792 to 8dacbc9 Compare January 26, 2023 12:03
@fmeum fmeum force-pushed the 16966-backwards-compatible-optional-toolchain branch from 8dacbc9 to 74b3c9f Compare January 26, 2023 12:16
@ShreeM01 ShreeM01 added team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Jan 26, 2023
@oquenchil oquenchil added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jan 27, 2023
@sgowroji sgowroji removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jan 30, 2023
@fmeum fmeum deleted the 16966-backwards-compatible-optional-toolchain branch January 30, 2023 17:30
hvadehra pushed a commit that referenced this pull request Feb 14, 2023
Rules that want to use optional toolchains but still support builds that don't use C++ toolchain resolution should point their `_cc_toolchain` attribute to the new
`@bazel_tools//tools/cpp:optional_current_cc_toolchain` target.

Fixes #16966

Closes #16968.

PiperOrigin-RevId: 505707967
Change-Id: I251749348f982ae063b51f7d9cc0078a1b61a948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using optional C++ toolchains while maintaining compatibility with non-platform builds
5 participants