Skip to content

Commit

Permalink
WASM_LEGACY_EXCEPTIONS=0 uses the LLVM implementation
Browse files Browse the repository at this point in the history
Rather than the previously used Binaryen translator, see commit:
emscripten-core/emscripten@62304e2
  • Loading branch information
kleisauke committed Jan 30, 2025
1 parent 65c2adc commit 9a71ee7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ if [ "$WASM_EH" = "true" ]; then
COMMON_FLAGS+=" -fwasm-exceptions -sSUPPORT_LONGJMP=wasm"
# https://github.com/rust-lang/rust/pull/131830
export RUSTFLAGS+=" -Zemscripten-wasm-eh"
if [ "$WASM_EXNREF" = "true" ]; then
COMMON_FLAGS+=" -sWASM_LEGACY_EXCEPTIONS=0"
export RUSTFLAGS+=" -Cllvm-args=-wasm-enable-exnref"
fi
else
COMMON_FLAGS+=" -fexceptions"
fi
Expand All @@ -145,7 +149,6 @@ export CXXFLAGS="$CFLAGS"

export LDFLAGS="$COMMON_FLAGS -L$TARGET/lib -sAUTO_JS_LIBRARIES=0 -sAUTO_NATIVE_LIBRARIES=0"
if [ "$WASM_BIGINT" = "false" ]; then export LDFLAGS+=" -sWASM_BIGINT=0"; fi
if [ "$WASM_EXNREF" = "true" ]; then export LDFLAGS+=" -sWASM_LEGACY_EXCEPTIONS=0"; fi

# Build paths
export CPATH="$TARGET/include"
Expand Down

0 comments on commit 9a71ee7

Please sign in to comment.