@@ -12,9 +12,11 @@ common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
1212
1313build --repo_env=CC=clang --repo_env=CXX=clang++
1414
15- # macOS Xcode-coupled flags, scoped to Swift builds only so that non-Swift
16- # builds (C/C++/Rust/...) work with just the Command Line Tools. Enable
17- # with `--config=swift_macos` (see `unified/swift-syntax-rs/README.md`).
15+ # macOS Xcode-coupled flags, grouped under `--config=swift_macos` so they're
16+ # easy to see, disable, or omit for non-Xcode setups. Auto-enabled for
17+ # macOS below via `common:macos --config=swift_macos` because `rules_swift`
18+ # auto-registers `xcode_swift_toolchain` on macOS, and its analysis fails
19+ # without these flags whenever a Swift target is in the graph.
1820#
1921# - `--xcode_version_config` selects `apple_support`'s xcode_config, whose
2022# version strings match the ones `rules_swift`'s `system_sdk` selects are
@@ -26,6 +28,7 @@ build --repo_env=CC=clang --repo_env=CXX=clang++
2628# toolchains; only matches Apple platforms.
2729build:swift_macos --xcode_version_config=@local_config_xcode//:host_xcodes
2830build:swift_macos --extra_toolchains=@local_config_apple_cc_toolchains//:all
31+ common:macos --config=swift_macos
2932
3033# Disable Android SDK auto-detection (we don't use it, and rules_android has Bazel 9 compatibility issues)
3134build --repo_env=ANDROID_HOME=
0 commit comments