mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
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:
@@ -2451,10 +2451,10 @@ fn add_order_independent_options(
|
||||
}
|
||||
|
||||
if sess.target.os == "emscripten" {
|
||||
cmd.cc_arg(if sess.panic_strategy() == PanicStrategy::Abort {
|
||||
"-sDISABLE_EXCEPTION_CATCHING=1"
|
||||
} else if sess.opts.unstable_opts.emscripten_wasm_eh {
|
||||
cmd.cc_arg(if sess.opts.unstable_opts.emscripten_wasm_eh {
|
||||
"-fwasm-exceptions"
|
||||
} else if sess.panic_strategy() == PanicStrategy::Abort {
|
||||
"-sDISABLE_EXCEPTION_CATCHING=1"
|
||||
} else {
|
||||
"-sDISABLE_EXCEPTION_CATCHING=0"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user