Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ 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 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")
Copy link
Member

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.

install(TARGETS binaryen_wasm DESTINATION ${CMAKE_INSTALL_BINDIR})

# binaryen.js JavaScript variant
Expand Down Expand Up @@ -550,6 +553,9 @@ 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 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")
install(TARGETS binaryen_js DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

Expand Down