-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tell emscripten to remove exception handling code when the panic runtime is used #36900
Comments
If you mean I think a, perhaps, more feasible alternative would be special casing this target to have rustc pass the extra, needed flags to emcc when the panic=abort profile is selected. At least this trick can be kept private to rustc. |
Agreed with @japaric, I don't think |
As I mentioned in the discuss thread, it'd also be nice to consider the possibility of making abort the default for emscripten. |
I think abort SHOULD be the default for emscripten! Exceptions in emscripten absolutely trash performance, even if no exception is ever thrown. |
I'd be interested in contributing a PR for this, using @japaric's approach. This'd be my first Rust PR, so should I look for an |
@geppy sorry for not getting back to you earlier. It seems like we can't do @japaric's approach but need to teach the compiler how to add the arguments without It looks like the logic belongs in |
…xcrichton Tell emscripten to remove exception handling code when panic=abort Fixes rust-lang#36900
emcc can remove invoke instructions during final translation. So when compiling with
-C panic-runtime=abort
, in order to strip the unwinding code out of std, we should pass the appropriate flags to emcc. This can probably be done be setting thelink_args
from the panic_abort crate.The text was updated successfully, but these errors were encountered: