1
Fork 0

Add support for wasm exception handling to Emscripten target

Gated behind an unstable `-Z emscripten-wasm-eh` flag
This commit is contained in:
Hood Chatham 2024-10-17 13:00:35 +02:00
parent bf6f8a4d32
commit 49c74234a7
21 changed files with 131 additions and 10 deletions

View file

@ -109,7 +109,10 @@ unsafe fn configure_llvm(sess: &Session) {
add("-wasm-enable-eh", false);
}
if sess.target.os == "emscripten" && sess.panic_strategy() == PanicStrategy::Unwind {
if sess.target.os == "emscripten"
&& !sess.opts.unstable_opts.emscripten_wasm_eh
&& sess.panic_strategy() == PanicStrategy::Unwind
{
add("-enable-emscripten-cxx-exceptions", false);
}