Skip to content

Commit

Permalink
Add TODO comments for Rust codegen options
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Jan 30, 2025
1 parent 9a71ee7 commit f3255fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ done
#export LDFLAGS+=" --source-map-base http://localhost:3000/lib/"

# Rust flags
# TODO(kleisauke): Remove +bulk-memory,+nontrapping-fptoint once Rust updates LLVM to 20, see:
# https://github.com/llvm/llvm-project/commit/1bc2cd98c58a1059170dc38697c7a29a8e21160b
export RUSTFLAGS="-Ctarget-feature=+atomics,+bulk-memory,+nontrapping-fptoint -Zdefault-visibility=hidden"

# Common compiler flags
Expand All @@ -132,6 +134,8 @@ if [ "$WASM_EH" = "true" ]; then
export RUSTFLAGS+=" -Zemscripten-wasm-eh"
if [ "$WASM_EXNREF" = "true" ]; then
COMMON_FLAGS+=" -sWASM_LEGACY_EXCEPTIONS=0"
# TODO(kleisauke): Switch to -wasm-use-legacy-eh=0 once Rust updates LLVM to 20, see:
# https://github.com/llvm/llvm-project/commit/a8e1135baa9074f7c088c8e1999561f88699b56e
export RUSTFLAGS+=" -Cllvm-args=-wasm-enable-exnref"
fi
else
Expand Down

0 comments on commit f3255fb

Please sign in to comment.