Ensure arm mac builds for arm
The github runner is run under rosetta using `arch -x86_64`, so cmake
configures the build to target x86_64. Escape rosetta to fix this.
@@ -53,13 +53,12 @@ jobs:
- run: git clone --depth 1 --branch solana-rustc/12.0-2021-04-15 git://github.com/solana-labs/llvm-project.git
- name: Install Ninja
uses: llvm/actions/install-ninja@main
- - run: cmake -G Ninja -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_TERMINFO=Off
+ - run: arch -arm64 cmake -G Ninja -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_TERMINFO=Off
-DLLVM_ENABLE_PROJECTS='clang;lld'
-DLLVM_TARGETS_TO_BUILD='WebAssembly;BPF'
- -DCMAKE_OSX_ARCHITECTURES=arm64
-DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=../llvm12.0 llvm
working-directory: ./llvm-project/
- - run: cmake --build . --target install
+ - run: arch -arm64 cmake --build . --target install
working-directory: ./llvm-project/
- run: tar Jcf ./llvm12.0-mac-arm.tar.xz ./llvm12.0/
- name: Upload Release Asset
