Skip to content

Commit c3dbde2

Browse files
authored
Rollup merge of rust-lang#89762 - nedv-eu:issue-85821-fix, r=pnkfelix
Change default panic strategy to abort for wasm32-unknown-emscripten Emscripten v2.0.10 removed __gxx_personality_v0 function stub that panic-unwind in wam32-unknown-emscripten target depends on. This causes linker error when using newer versions of emscripten compiler. As mentioned in rust-lang#85821 (comment) the __gxx_personality_v0 function was just a stub in emscripten for several years and therefor the panic-unwind strategy was broken all the time. Changing default to abort fixes builds (issue 85821) with recent version of emscripten yet we are not loosing any functionality as the panic-unwind was broken anyway. Fixes rust-lang#85821
2 parents a737592 + 8b8bbf0 commit c3dbde2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn target() -> Target {
3535
exe_suffix: ".js".to_string(),
3636
linker: None,
3737
is_like_emscripten: true,
38-
panic_strategy: PanicStrategy::Unwind,
38+
panic_strategy: PanicStrategy::Abort,
3939
post_link_args,
4040
families: vec!["unix".to_string(), "wasm".to_string()],
4141
..options

0 commit comments

Comments
 (0)