Skip to content

Commit 1ebefde

Browse files
authored
fix: fix macos arm64 build (#9)
1 parent ab5486f commit 1ebefde

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: .github/workflows/CI.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,15 @@ jobs:
4343
npm run build -- --target x86_64-unknown-linux-gnu --zig --zig-abi-suffix 2.12 &&
4444
llvm-strip -x *.node
4545
- host: macos-latest
46+
architecture: x64
4647
target: aarch64-apple-darwin
4748
build: |
48-
npm run build --target=aarch64-apple-darwin
49+
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
50+
export CC=$(xcrun -f clang);
51+
export CXX=$(xcrun -f clang++);
52+
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
53+
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
54+
npm run build -- --target aarch64-apple-darwin
4955
strip -x *.node
5056
- host: ubuntu-latest
5157
architecture: x64

0 commit comments

Comments
 (0)