diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-01-06 22:04:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-06 22:04:13 -0500 |
| commit | 4e4a93c2dd4bae8472924d03c37f387fbf3b074c (patch) | |
| tree | c8db61e78f14c45c4121735e00d7d6d7c8e5d35d /library/unwind | |
| parent | 0f1e965fec3bc2f97b932e9dd8e85fca6d7faadc (diff) | |
| parent | 49c74234a79107afa7f86ca947708c3abef07674 (diff) | |
| download | rust-4e4a93c2dd4bae8472924d03c37f387fbf3b074c.tar.gz rust-4e4a93c2dd4bae8472924d03c37f387fbf3b074c.zip | |
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.
Diffstat (limited to 'library/unwind')
| -rw-r--r-- | library/unwind/Cargo.toml | 2 | ||||
| -rw-r--r-- | library/unwind/src/lib.rs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/library/unwind/Cargo.toml b/library/unwind/Cargo.toml index e13c9a06c05..66e8d1a3ffe 100644 --- a/library/unwind/Cargo.toml +++ b/library/unwind/Cargo.toml @@ -37,4 +37,4 @@ system-llvm-libunwind = [] [lints.rust.unexpected_cfgs] level = "warn" -check-cfg = [] +check-cfg = ['cfg(emscripten_wasm_eh)'] diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs index 7af1882ab73..e4ba2bc1ed8 100644 --- a/library/unwind/src/lib.rs +++ b/library/unwind/src/lib.rs @@ -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")))] |
