-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Support -Cpanic=unwind on WASI targets
#156061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1500,7 +1500,7 @@ impl Build { | |
| if let Some(path) = finder.maybe_have("wasmtime") | ||
| && let Ok(mut path) = path.into_os_string().into_string() | ||
| { | ||
| path.push_str(" run -C cache=n --dir ."); | ||
| path.push_str(" run -Wexceptions -C cache=n --dir ."); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are no tests added that use exceptions, right?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Almost yeah, but there's one test that does
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised that even works without |
||
| // Make sure that tests have access to RUSTC_BOOTSTRAP. This (for example) is | ||
| // required for libtest to work on beta/stable channels. | ||
| // | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't
rust/compiler/rustc_codegen_ssa/src/base.rs
Lines 369 to 375 in 54f67d2
Edit: Might be confused with wasm vs js exception handling.
View changes since the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe, yeah, that's related to the Emscripten-specific scheme of exceptions pre-wasm-exceptions of using JS instead. Effectively there's 3 modes of exceptions on Wasm:
wants_wasm_ehisfalseand is only applicable to historical versions of the Emscripten target (or-Zemscripten-wasm-eh=false)wants_wasm_ehistrue. LLVM by default emits this today.wants_wasm_ehistrueplus an option to LLVM to use the new instructions.For (1) the LLVM IR is different, and for (2) and (3) they're the same IR. I don't know much about (1) myself. For WASI this PR only exposes (3)