1
Fork 0

Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubilee

Add support for wasm exception handling to Emscripten target

This is a draft because we need some additional setting for the Emscripten target to select between the old exception handling and the new exception handling. I don't know how to add a setting like that, would appreciate advice from Rust folks. We could maybe choose to use the new exception handling if `Ctarget-feature=+exception-handling` is passed? I tried this but I get errors from llvm so I'm not doing it right.
This commit is contained in:
Jacob Pratt 2025-01-06 22:04:13 -05:00 committed by GitHub
commit 4e4a93c2dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 131 additions and 10 deletions

View file

@ -26,7 +26,10 @@ pub(crate) fn check_crate(
if items.eh_personality().is_none() {
items.missing.push(LangItem::EhPersonality);
}
if tcx.sess.target.os == "emscripten" && items.eh_catch_typeinfo().is_none() {
if tcx.sess.target.os == "emscripten"
&& items.eh_catch_typeinfo().is_none()
&& !tcx.sess.opts.unstable_opts.emscripten_wasm_eh
{
items.missing.push(LangItem::EhCatchTypeinfo);
}