@@ -227,12 +227,17 @@ use_repo(
227227# patched prebuilt toolchain wired up via `swift_deps` above.
228228#
229229# Bazel cannot auto-select between Linux distributions, so the toolchain is
230- # registered explicitly for the distribution our CI runs on (ubuntu24.04,
231- # x86_64). Add further platforms here if CI grows to cover them.
230+ # registered explicitly for the distributions/platforms our CI runs on:
231+ # - ubuntu24.04 / x86_64 (Linux CI)
232+ # - xcode (macOS CI — covers both Apple Silicon and Intel)
232233#
233- # We register the `exec` toolchain (normal host compilation, targeting
234- # linux/x86_64) rather than the `embedded` one, which targets `os:none`
235- # (Embedded Swift) and would not match a normal host build.
234+ # NOTE: The macOS toolchain is distributed as a `.pkg` archive that can only
235+ # be extracted on a macOS host. Do not build the `xcode` toolchain on Linux.
236+ #
237+ # We register the `exec` toolchains (normal host compilation) rather than the
238+ # `embedded` ones, which target `os:none` (Embedded Swift) and would not
239+ # match a normal host build. Bazel selects the toolchain matching the host
240+ # platform automatically.
236241#
237242# The Swift version is read from `unified/swift-syntax-rs/.swift-version`, which
238243# is the single source of truth shared with the local `cargo` build (via
@@ -246,10 +251,12 @@ use_repo(
246251 swift ,
247252 "swift_toolchain" ,
248253 "swift_toolchain_ubuntu24.04" ,
254+ "swift_toolchain_xcode" ,
249255)
250256
251257register_toolchains (
252258 "@swift_toolchain//:swift_toolchain_exec_ubuntu24.04" ,
259+ "@swift_toolchain//:swift_toolchain_exec_xcode" ,
253260)
254261
255262node = use_extension ("@rules_nodejs//nodejs:extensions.bzl" , "node" )
0 commit comments