Address review comments on swift-syntax-rs macOS toolchain docs

This commit is contained in:
copilot-swe-agent[bot]
2026-07-14 13:55:58 +00:00
committed by GitHub
parent f8a9b0d35b
commit 266eef5556
2 changed files with 2 additions and 10 deletions

View File

@@ -18,14 +18,6 @@ _SWIFT_SUPPORTED_PLATFORMS = select({
# Swift FFI shim: wraps swift-syntax and exposes a small C ABI. The Rust
# targets below link against its `CcInfo`.
#
# On macOS, `rules_swift` auto-registers `xcode_swift_toolchain`, whose
# analysis fails against Bazel's default `local_config_cc`. To avoid
# forcing every macOS target in the repo onto the Apple CC toolchain, the
# Xcode-config flags are applied only along the incoming edge into this
# `swift_library` via `xcode_transition_swift_library` (see
# `xcode_transition.bzl`). Downstream Rust targets stay in the default
# configuration.
xcode_transition_swift_library(
name = "swift_syntax_ffi",
srcs = ["swift/Sources/SwiftSyntaxFFI/SwiftSyntaxFFI.swift"],

View File

@@ -148,8 +148,8 @@ Requirements:
**macOS / `xcode`** (Apple Silicon and Intel). Bazel selects the toolchain
matching the host. Targets are marked `target_compatible_with` these two
OSes, so on Windows Bazel skips them cleanly.
- **macOS only:** the macOS toolchain is a `.pkg` archive that can only be
fetched and extracted on a macOS host. On macOS, `rules_swift` also needs
- **macOS only:** the Swift toolchain comes from the host Xcode installation
(`rules_swift` auto-registers `xcode_swift_toolchain`), which also needs
Xcode's CC toolchain and xcode_config; these are applied to the Swift
target via an incoming-edge Starlark transition (see
[`xcode_transition.bzl`](xcode_transition.bzl)), so other targets on macOS