1
Fork 0

Add support for wasm exception handling to Emscripten target

Gated behind an unstable `-Z emscripten-wasm-eh` flag
This commit is contained in:
Hood Chatham 2024-10-17 13:00:35 +02:00
parent bf6f8a4d32
commit 49c74234a7
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);
}