rules_apple
rules_apple copied to clipboard
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
SwiftToolchainInfoprovider inplatform_common.ToolchainInfo, for future use bytoolchain()rules. - Funnels all toolchain access through a new
swift_toolchain.get_toolchain()function that looks up the toolchain usingctx.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 73b248d8ac1b4b679a411d2785bdef323c923f0e)
this requires some rules_swift changes
Lyft integration job started: https://buildkite.com/lyft/rules-apple/builds/543 (must be Lyft employee to view)