Skip to content

Commit 4ba85eb

Browse files
authored
Also set MACOSX_DEPLOYMENT_TARGET in action_env for exec config
1 parent 0662060 commit 4ba85eb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.bazelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@ build --repo_env=CC=clang --repo_env=CXX=clang++
1818
# invoked without a deployment target and fails with
1919
# "Swift requires a minimum deployment target of macOS 10.9.0" on recent
2020
# macOS versions. 10.15 matches swift-syntax's declared minimum platform.
21+
# `--macos_minimum_os` covers the target config; the exec/host config
22+
# (used for e.g. Swift macro compilation) needs `MACOSX_DEPLOYMENT_TARGET`
23+
# on the action env, since `--host_macos_minimum_os` doesn't reach the
24+
# standalone Swift toolchain in rules_swift 4.x.
2125
build:macos --macos_minimum_os=10.15
2226
build:macos --host_macos_minimum_os=10.15
27+
build:macos --action_env=MACOSX_DEPLOYMENT_TARGET=10.15
28+
build:macos --host_action_env=MACOSX_DEPLOYMENT_TARGET=10.15
2329
# Disable Android SDK auto-detection (we don't use it, and rules_android has Bazel 9 compatibility issues)
2430
build --repo_env=ANDROID_HOME=
2531

0 commit comments

Comments
 (0)