-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce the
swift_common.get_toolchain
helper function
This is change 1 of _N_ to migrate the Swift build rules to use new-style Bazel toolchains. This change: * Updates the toolchain configuration rules to wrap the `SwiftToolchainInfo` provider in `platform_common.ToolchainInfo`, for future use by `toolchain()` rules. * Funnels all toolchain access through a new `swift_toolchain.get_toolchain()` function that looks up the toolchain using `ctx.toolchains`, falling back to the implicit attribute. Since `ctx.toolchains` isn't defined yet, the second change is a no-op but it simplifies future parts of the migration. PiperOrigin-RevId: 439638938 (cherry picked from commit 73b248d) Signed-off-by: Brentley Jones <github@brentleyjones.com>
- Loading branch information
1 parent
4f54ce1
commit 49065f7
Showing
2 changed files
with
11 additions
and
8 deletions.
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