rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

Introduce the `swift_common.get_toolchain` helper function.

Open keith opened this issue 4 years ago • 2 comments

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 73b248d8ac1b4b679a411d2785bdef323c923f0e)

keith avatar Apr 25 '22 18:04 keith

this requires some rules_swift changes

keith avatar Apr 25 '22 18:04 keith

Lyft integration job started: https://buildkite.com/lyft/rules-apple/builds/543 (must be Lyft employee to view)

lyft-lint-bot avatar Apr 25 '22 18:04 lyft-lint-bot