Skip to content

Commit 6ddfc01

Browse files
committed
chore(workflows): add LLVM installation for macOS
1 parent abda853 commit 6ddfc01

3 files changed

Lines changed: 679 additions & 1255 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ jobs:
230230
shell: bash
231231
run: |
232232
set -eux
233+
if [ "${{ matrix.platform }}" = "macos-latest" ]; then
234+
brew install llvm
235+
echo "CC=$(brew --prefix llvm)/bin/clang" >> "$GITHUB_ENV"
236+
fi
233237
rustup target add wasm32-unknown-unknown
234238
cargo install wasm-bindgen-cli --version 0.2.126 --locked
235239

scripts/build-wasm-bridge.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ const env = { ...process.env }
7575
const cc = resolveCc(env)
7676
if (cc) {
7777
env.CC = cc
78+
} else if (process.platform === 'darwin') {
79+
console.error(
80+
'build-wasm-bridge: macOS needs LLVM clang for wasm32 (Apple clang cannot target wasm32-unknown-unknown). Install with: brew install llvm'
81+
)
82+
process.exit(1)
7883
}
7984

8085
const wasmBridgeDir = path.join(root, 'wasm-bridge')

0 commit comments

Comments
 (0)