Rollup merge of #135450 - hoodmane:wasm-eh-abort-fix, r=workingjubilee
Fix emscripten-wasm-eh with unwind=abort If we build the standard library with wasm-eh then we need to link with `-fwasm-exceptions` even if we compile with `panic=abort`. Without this change, linking a `panic=abort` crate fails with: `undefined symbol: __cpp_exception`. Followup to #131830. r? workingjubilee
This commit is contained in:
commit
05ae6bfeb4
1 changed files with 3 additions and 3 deletions
|
@ -2451,10 +2451,10 @@ fn add_order_independent_options(
|
||||||
}
|
}
|
||||||
|
|
||||||
if sess.target.os == "emscripten" {
|
if sess.target.os == "emscripten" {
|
||||||
cmd.cc_arg(if sess.panic_strategy() == PanicStrategy::Abort {
|
cmd.cc_arg(if sess.opts.unstable_opts.emscripten_wasm_eh {
|
||||||
"-sDISABLE_EXCEPTION_CATCHING=1"
|
|
||||||
} else if sess.opts.unstable_opts.emscripten_wasm_eh {
|
|
||||||
"-fwasm-exceptions"
|
"-fwasm-exceptions"
|
||||||
|
} else if sess.panic_strategy() == PanicStrategy::Abort {
|
||||||
|
"-sDISABLE_EXCEPTION_CATCHING=1"
|
||||||
} else {
|
} else {
|
||||||
"-sDISABLE_EXCEPTION_CATCHING=0"
|
"-sDISABLE_EXCEPTION_CATCHING=0"
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue