wasm: move MODULARIZE to EXPORT_NAME finalizer
This avoids a "must set EXPORT_NAME when using MODULARIZE with pthreads" error when linking libQtGui.so. Both settings only apply for the final executable since they affect how the wasm module is loaded from JS; setting them together here makes sense. Pick-to: 6.8 Change-Id: Ibebeeee38203486675c43b416cb674e8ece9c147 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
This commit is contained in:
parent
e5516191b2
commit
9768d8e1ba
@ -18,9 +18,6 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
|
||||
target_compile_options("${wasmTarget}" INTERFACE "SHELL:-s MEMORY64=1" )
|
||||
target_link_options("${wasmTarget}" INTERFACE "SHELL:-s MEMORY64=1" -mwasm64)
|
||||
endif()
|
||||
# Enable MODULARIZE so that we are able to set EXPORT_NAME later and instantiate on demand (with
|
||||
# MODULARIZE=0, emscripten creates a global app instance object at Javascript eval time)
|
||||
target_link_options("${wasmTarget}" INTERFACE "SHELL:-s MODULARIZE=1")
|
||||
|
||||
#simd
|
||||
if (QT_FEATURE_wasm_simd128)
|
||||
|
@ -126,6 +126,7 @@ endfunction()
|
||||
|
||||
function(_qt_internal_set_wasm_export_name target)
|
||||
_qt_internal_wasm_export_name_for_target(export_name ${target})
|
||||
target_link_options("${target}" PRIVATE "SHELL:-s MODULARIZE=1")
|
||||
target_link_options("${target}" PRIVATE "SHELL:-s EXPORT_NAME=${export_name}")
|
||||
endfunction()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user