Skip to content

Commit 84c2a67

Browse files
committed
Reenable exception catching in Emscripten even on optimized targets
1 parent eed6168 commit 84c2a67

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/librustc_trans/back/link.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,13 @@ fn link_natively(sess: &Session,
722722
cmd.arg(root.join(obj));
723723
}
724724

725-
if sess.target.target.options.is_like_emscripten &&
726-
sess.panic_strategy() == PanicStrategy::Abort {
727-
cmd.args(&["-s", "DISABLE_EXCEPTION_CATCHING=1"]);
725+
if sess.target.target.options.is_like_emscripten {
726+
cmd.arg("-s");
727+
cmd.arg(if sess.panic_strategy() == PanicStrategy::Abort {
728+
"DISABLE_EXCEPTION_CATCHING=1"
729+
} else {
730+
"DISABLE_EXCEPTION_CATCHING=0"
731+
});
728732
}
729733

730734
{

0 commit comments

Comments
 (0)