Skip to content

Commit f0df2e6

Browse files
committed
Make sure to build x86_64 binaries on Mac.
On the new ARM64 Macs, the default target architecture is ARM64. However ARM64 binaries only run on those new Macs, whereas the x86_64 run on both newer and older Macs. The longer term fix might be to have both an x86_64 and a darwin_arm64 binary.
1 parent fa4532a commit f0df2e6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: build.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ mkdir -p ~/src/llvm-project/build.release
1515
pushd ~/src/llvm-project/build.release
1616

1717
echo === Building based on r$(git log -n 1 --pretty=format:"%h") ...
18-
cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_ENABLE_PROJECTS=clang ../llvm
18+
cmake -G Ninja \
19+
-DCMAKE_BUILD_TYPE=MinSizeRel \
20+
-DLLVM_ENABLE_PROJECTS=clang \
21+
-DLLVM_TARGET_ARCH=x86_64 \
22+
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin \
23+
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
24+
../llvm
1925
ninja clang-format
2026
popd
2127

0 commit comments

Comments
 (0)