-
Notifications
You must be signed in to change notification settings - Fork 835
binaryen.js: Avoid catching exit/rejection which confuses Node error reporting #6764
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 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…reporting
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -500,6 +500,10 @@ if(EMSCRIPTEN) | |
| target_link_libraries(binaryen_wasm optimized "-Wno-error=closure") | ||
| target_link_libraries(binaryen_wasm optimized "-flto") | ||
| target_link_libraries(binaryen_wasm debug "--profiling") | ||
| # Avoid catching exit/rejection as that can confuse error reporting in Node, | ||
| # see https://github.com/emscripten-core/emscripten/issues/17228 | ||
| target_link_libraries(binaryen_wasm "-sNODEJS_CATCH_EXIT=0") | ||
| target_link_libraries(binaryen_wasm "-sNODEJS_CATCH_REJECTION=0") | ||
|
||
| install(TARGETS binaryen_wasm DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
|
|
||
| # binaryen.js JavaScript variant | ||
|
|
@@ -550,6 +554,10 @@ if(EMSCRIPTEN) | |
| target_link_libraries(binaryen_js optimized "-flto") | ||
| target_link_libraries(binaryen_js debug "--profiling") | ||
| target_link_libraries(binaryen_js debug "-sASSERTIONS") | ||
| # Avoid catching exit/rejection as that can confuse error reporting in Node, | ||
| # see https://github.com/emscripten-core/emscripten/issues/17228 | ||
| target_link_libraries(binaryen_js "-sNODEJS_CATCH_EXIT=0") | ||
| target_link_libraries(binaryen_js "-sNODEJS_CATCH_REJECTION=0") | ||
| install(TARGETS binaryen_js DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
| endif() | ||
|
|
||
|
|
||
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'm in the process of trying to disable this by default, but this change lgtm either way.