summaryrefslogtreecommitdiff
path: root/cmake/QtWasmHelpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtWasmHelpers.cmake')
-rw-r--r--cmake/QtWasmHelpers.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtWasmHelpers.cmake b/cmake/QtWasmHelpers.cmake
index 20d4bc5c29..7ba7cd893a 100644
--- a/cmake/QtWasmHelpers.cmake
+++ b/cmake/QtWasmHelpers.cmake
@@ -29,6 +29,12 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
target_compile_options("${wasmTarget}" INTERFACE -O2 -msimd128 -msse -msse2)
endif()
+ # wasm exceptions
+ if (QT_FEATURE_wasm_exception)
+ target_compile_options("${wasmTarget}" INTERFACE -fwasm-exceptions)
+ target_link_options("${wasmTarget}" INTERFACE -fwasm-exceptions)
+ endif()
+
target_link_options("${wasmTarget}" INTERFACE "SHELL:-s DISABLE_EXCEPTION_CATCHING=1")
if (QT_FEATURE_thread)