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:
commit
4e4a93c2dd
21 changed files with 131 additions and 10 deletions
|
@ -37,4 +37,4 @@ system-llvm-libunwind = []
|
|||
|
||||
[lints.rust.unexpected_cfgs]
|
||||
level = "warn"
|
||||
check-cfg = []
|
||||
check-cfg = ['cfg(emscripten_wasm_eh)']
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
#![feature(staged_api)]
|
||||
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
||||
#![cfg_attr(
|
||||
all(target_family = "wasm", not(target_os = "emscripten")),
|
||||
all(target_family = "wasm", any(not(target_os = "emscripten"), emscripten_wasm_eh)),
|
||||
feature(simd_wasm64, wasm_exception_handling_intrinsics)
|
||||
)]
|
||||
#![allow(internal_features)]
|
||||
#![cfg_attr(not(bootstrap), feature(cfg_emscripten_wasm_eh))]
|
||||
|
||||
// Force libc to be included even if unused. This is required by many platforms.
|
||||
#[cfg(not(all(windows, target_env = "msvc")))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue