Skip to content

Commit f4634f0

Browse files
committed
Add -Z emscritpen-wasm-eh flag
Don't make it do anything yet
1 parent ad37cc8 commit f4634f0

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

compiler/rustc_interface/src/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ fn test_unstable_options_tracking_hash() {
782782
tracked!(dwarf_version, Some(5));
783783
tracked!(embed_source, true);
784784
tracked!(emit_thin_lto, false);
785+
tracked!(emscripten_wasm_eh)
785786
tracked!(export_executable_symbols, true);
786787
tracked!(fewer_names, Some(true));
787788
tracked!(fixed_x18, true);

compiler/rustc_session/src/options.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,8 @@ options! {
17711771
"emit a section containing stack size metadata (default: no)"),
17721772
emit_thin_lto: bool = (true, parse_bool, [TRACKED],
17731773
"emit the bc module with thin LTO info (default: yes)"),
1774+
emscripten_wasm_eh: bool = (false, parse_bool, [TRACKED],
1775+
"Use WebAssembly error handling for wasm32-unknown-emscripten"),
17741776
enforce_type_length_limit: bool = (false, parse_bool, [TRACKED],
17751777
"enforce the type length limit when monomorphizing instances in codegen"),
17761778
export_executable_symbols: bool = (false, parse_bool, [TRACKED],
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# `emscripten-wasm-eh`
2+
3+
Use the WebAssembly exception handling ABI to unwind for the
4+
`wasm32-unknown-emscripten`. If compiling with this setting, the `emcc` linker
5+
should be invoked with `-fwasm-exceptions`. If linking with C/C++ files, the
6+
C/C++ files should also be compiled with `-fwasm-exceptions`.

0 commit comments

Comments
 (0)