Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTell emscripten to remove exception handling code when the panic runtime is used #36900
Comments
brson
added
A-codegen
E-help-wanted
labels
Oct 1, 2016
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
|
Agreed with @japaric, I don't think |
This comment has been minimized.
This comment has been minimized.
|
As I mentioned in the discuss thread, it'd also be nice to consider the possibility of making abort the default for emscripten. |
This comment has been minimized.
This comment has been minimized.
|
I think abort SHOULD be the default for emscripten! Exceptions in emscripten absolutely trash performance, even if no exception is ever thrown. |
This comment has been minimized.
This comment has been minimized.
geppy
commented
Nov 20, 2016
|
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 |
This comment has been minimized.
This comment has been minimized.
|
@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 |
brson commentedOct 1, 2016
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_argsfrom the panic_abort crate.