@@ -21,29 +21,6 @@ build --repo_env=CC=clang --repo_env=CXX=clang++
2121common --flag_alias=swiftcopt=@rules_swift//swift:copt
2222common --flag_alias=host_swiftcopt=@rules_swift//swift:exec_copt
2323
24- # Force a versioned macOS target triple on Swift compilations only.
25- #
26- # Without `apple_support` in this module (see MODULE.bazel), Bazel uses its
27- # generic `local_config_cc` toolchain on macOS, whose `target_gnu_system_name`
28- # is unversioned (e.g. `arm64-apple-macosx`). Both rules_swift toolchains
29- # (standalone and xcode) build swiftc's `-target` argument from
30- # `ctx.var["CC_TARGET_TRIPLE"] or cc_toolchain.target_gnu_system_name`, so
31- # swiftc receives `-target arm64-apple-macosx` and fails with
32- # "Swift requires a minimum deployment target of macOS 10.9.0".
33- #
34- # `--macos_minimum_os` alone does not fix this (it doesn't feed either
35- # source). We append a versioned `-target` via `--swiftcopt` /
36- # `--host_swiftcopt`; swiftc treats the last `-target` as authoritative.
37- # These flags only affect Swift compile actions, so the scope is limited
38- # to //unified/swift-syntax-rs (the sole Swift consumer in this repo).
39- #
40- # 10.15 matches swift-syntax's declared minimum deployment target.
41- # NOTE: this pins the CPU to arm64 (Apple Silicon), which is fine because
42- # macOS 26 is Apple-Silicon-only. If Intel macOS Bazel builds are ever
43- # needed, override in local.bazelrc.
44- build:macos --swiftcopt=-target --swiftcopt=arm64-apple-macosx10.15
45- build:macos --host_swiftcopt=-target --host_swiftcopt=arm64-apple-macosx10.15
46-
4724# Point Bazel at `apple_support`'s xcode_config on macOS.
4825#
4926# `xcode_swift_toolchain` pulls in `@system_sdk//:{all_modules,implicit_modules}`,
0 commit comments