Skip to content

Commit 266eef5

Browse files
authored
Address review comments on swift-syntax-rs macOS toolchain docs
1 parent f8a9b0d commit 266eef5

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

‎unified/swift-syntax-rs/BUILD.bazel‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ _SWIFT_SUPPORTED_PLATFORMS = select({
1818

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

‎unified/swift-syntax-rs/README.md‎

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

0 commit comments

Comments
 (0)