Skip to content

Commit

Permalink
Fix cross compile on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Jul 4, 2022
1 parent 0bdebb1 commit ef933b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ build() {
python3 ./x.py --config "../config-${OS}.toml" --host $TRIPLE install
cd ../

RUST_CLANG=$(rust/build/$TRIPLE/llvm/bin/llvm-config --version)
if [ $OS = "darwin" -a $ARCH = "aarch64" ]; then
RUST_CLANG=$(rust/build/x86_64-apple-darwin/llvm/bin/llvm-config --version)
else
RUST_CLANG=$(rust/build/$TRIPLE/llvm/bin/llvm-config --version)
fi

cd out
cp -af ../rust/build/$TRIPLE/llvm/bin llvm-bin
Expand Down

0 comments on commit ef933b2

Please sign in to comment.