Skip to content

Commit 0662060

Browse files
authored
Set macOS minimum deployment target for Swift builds in .bazelrc
1 parent 13d2a12 commit 0662060

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.bazelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ build --compilation_mode opt
1111
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
1212

1313
build --repo_env=CC=clang --repo_env=CXX=clang++
14+
15+
# Set a macOS deployment target for both target and exec configurations so
16+
# that the hermetic Swift toolchain used by //unified/swift-syntax-rs (and
17+
# its `swift-syntax` dependency) compiles. Without this, `swiftc` is
18+
# invoked without a deployment target and fails with
19+
# "Swift requires a minimum deployment target of macOS 10.9.0" on recent
20+
# macOS versions. 10.15 matches swift-syntax's declared minimum platform.
21+
build:macos --macos_minimum_os=10.15
22+
build:macos --host_macos_minimum_os=10.15
1423
# Disable Android SDK auto-detection (we don't use it, and rules_android has Bazel 9 compatibility issues)
1524
build --repo_env=ANDROID_HOME=
1625

0 commit comments

Comments
 (0)