@@ -148,7 +148,8 @@ jobs:
148148 target : ${{ inputs.target }}
149149 image : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
150150 profile : ${{ inputs.profile }}
151- pre : export CC_aarch64_unknown_linux_gnu=clang
151+ pre : |
152+ export CC_aarch64_unknown_linux_gnu=clang
152153
153154 - name : Build x86_64-unknown-linux-musl in Docker
154155 if : ${{ inputs.target == 'x86_64-unknown-linux-musl' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
@@ -157,6 +158,12 @@ jobs:
157158 target : ${{ inputs.target }}
158159 image : ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
159160 profile : ${{ inputs.profile }}
161+ pre : |
162+ # musl will enable clang-sys static linking
163+ # https://github.com/KyleMayes/clang-sys?tab=readme-ov-file#static
164+ # llvm19-dev is used to install llvm-config
165+ # clang19-static is used to install libclang.a
166+ apk add llvm19-dev clang19-static
160167
161168 - name : Build aarch64-unknown-linux-musl in Docker
162169 if : ${{ inputs.target == 'aarch64-unknown-linux-musl' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
@@ -167,6 +174,11 @@ jobs:
167174 profile : ${{ inputs.profile }}
168175 pre : |
169176 export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc
177+ # musl will enable clang-sys static linking
178+ # https://github.com/KyleMayes/clang-sys?tab=readme-ov-file#static
179+ # llvm19-dev is used to install llvm-config
180+ # clang19-static is used to install libclang.a
181+ apk add llvm19-dev clang19-static
170182
171183 # setup rust target for windows and macos
172184 - name : Setup Rust Target
0 commit comments