Skip to content

Commit

Permalink
Rollup merge of rust-lang#89762 - nedv-eu:issue-85821-fix, r=pnkfelix
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthiaskrgr authored Dec 13, 2021
2 parents a737592 + 8b8bbf0 commit c3dbde2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn target() -> Target {
exe_suffix: ".js".to_string(),
linker: None,
is_like_emscripten: true,
panic_strategy: PanicStrategy::Unwind,
panic_strategy: PanicStrategy::Abort,
post_link_args,
families: vec!["unix".to_string(), "wasm".to_string()],
..options
Expand Down

0 comments on commit c3dbde2

Please # to comment.