wasm: add -fexceptions linker flag

This is required also for emscripten exceptions.

Task-number: QTBUG-121822
Change-Id: I2856f1800c41acb12005386d0a040056007472ab
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
This commit is contained in:
Morten Sørvig 2024-10-10 14:32:36 +02:00
parent 44dbd9bcc7
commit 75133e0222

View File

@ -25,10 +25,13 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
target_compile_options("${wasmTarget}" INTERFACE -O2 -msimd128 -msse -msse2)
endif()
# wasm exceptions
# exceptions
if (QT_FEATURE_wasm_exceptions)
target_compile_options("${wasmTarget}" INTERFACE -fwasm-exceptions)
target_link_options("${wasmTarget}" INTERFACE -fwasm-exceptions)
elseif(QT_FEATURE_exceptions)
# add link option only, compile option is added in cross-platform code
target_link_options("${wasmTarget}" INTERFACE -fexceptions)
endif()
if (QT_FEATURE_thread)