Skip to content

Conversation

@katre
Copy link
Collaborator

@katre katre commented Feb 7, 2022

Fixes #14728, part of #14727.

Rules can begin using this as soon as it is released (hopefully in Bazel
5.1), and then future versions of Bazel will update the functionality as
optional toolchains are added and C++ rules are updated to use them.

Fixes #14728, part of #14727.

Rules can begin using this as soon as it is released (hopefully in Bazel
5.1), and then future versions of Bazel will update the functionality as
optional toolchains are added and C++ rules are updated to use them.
@katre katre changed the title [WIP] Add a helper method for rules to depend on the cpp toolchain type. Add a helper method for rules to depend on the cpp toolchain type. Feb 8, 2022
@katre katre requested a review from comius February 8, 2022 16:56
@katre katre marked this pull request as ready for review February 8, 2022 16:56
@katre
Copy link
Collaborator Author

katre commented Feb 8, 2022

Does the idea behind this make sense? Will this make migrations to use optional toolchains easier, or will it just add an extra precondition because users want to support pre-5.1 versions of Bazel?

@brentleyjones
Copy link
Contributor

Will this make migrations to use optional toolchains easier, or will it just add an extra precondition because users want to support pre-5.1 versions of Bazel?

It will make it possible to be forward compatible, but only once a ruleset only supports Bazel 5.1+. That's better than nothing imo.

@bazel-io bazel-io closed this in 86e2db7 Feb 11, 2022
@katre katre deleted the i14728-cc-toolchain-type-helper branch February 11, 2022 14:52
fmeum pushed a commit to fmeum/bazel that referenced this pull request Feb 11, 2022
Fixes bazelbuild#14728, part of bazelbuild#14727.

Rules can begin using this as soon as it is released (hopefully in Bazel
5.1), and then future versions of Bazel will update the functionality as
optional toolchains are added and C++ rules are updated to use them.

Closes bazelbuild#14742.

PiperOrigin-RevId: 427931123
@fmeum
Copy link
Collaborator

fmeum commented Feb 11, 2022

I created #14795 to get this cherry-picked into 5.1.0.

@katre
Copy link
Collaborator Author

katre commented Feb 11, 2022

Thank you!

Wyverald pushed a commit that referenced this pull request Feb 14, 2022
…14795)

Fixes #14728, part of #14727.

Rules can begin using this as soon as it is released (hopefully in Bazel
5.1), and then future versions of Bazel will update the functionality as
optional toolchains are added and C++ rules are updated to use them.

Closes #14742.

PiperOrigin-RevId: 427931123

Co-authored-by: John Cater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a helper function for rules that need the CC toolchain

4 participants