Skip to content

Commit 5eaba48

Browse files
committed
Swift: fix local build on ARM macOS
As pointed out in bazelbuild/bazel#21768, bazel 7 moved multi-arch macOS toolchain support to `apple_support`, so building Swift (which must target `x86_64` for now) was broken. Internally in the codeql CLI we were unaffected as we use a custom bundled toolchain. This fixes building from this repository.
1 parent d9b0a59 commit 5eaba48

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
1111
build --repo_env=CC=clang --repo_env=CXX=clang++
1212

1313
build:linux --cxxopt=-std=c++20
14-
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
14+
build:macos --cxxopt=-std=c++20 --platforms=@apple_support//platforms:macos_x86_64
1515
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
1616

1717
try-import %workspace%/local.bazelrc

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ local_path_override(
1212
)
1313

1414
# see https://registry.bazel.build/ for a list of available packages
15-
15+
bazel_dep(name = "apple_support", version = "1.14.0")
1616
bazel_dep(name = "platforms", version = "0.0.8")
1717
bazel_dep(name = "rules_pkg", version = "0.9.1")
1818
bazel_dep(name = "rules_nodejs", version = "6.0.3")

0 commit comments

Comments
 (0)