diff options
| author | Piotr Wierciński <[email protected]> | 2024-11-12 16:09:41 +0100 |
|---|---|---|
| committer | Piotr Wierciński <[email protected]> | 2024-11-15 13:43:10 +0100 |
| commit | 5d6f12e6ec3b76d85fad5905f3bb367bb291b68e (patch) | |
| tree | 904c1b7b7242db3e7b047a20733b071d0dcf246b | |
| parent | 2f7d87555bc4c766b6c3fea389b95f08b7016d61 (diff) | |
wasm: Export required functions for Embind
This change prepares Qt for upgrading to Emscripten 3.1.70.
There is some weird behavior on emscripten which requires these flags:
https://github.com/emscripten-core/emscripten/issues/21844
Task-number: QTBUG-131279
Change-Id: I1b2a95241d6055fbcc4c6c451b62da1d3d3b3e7e
Reviewed-by: Morten Johan Sørvig <[email protected]>
Reviewed-by: Even Oscar Andersen <[email protected]>
| -rw-r--r-- | src/corelib/Qt6WasmMacros.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/Qt6WasmMacros.cmake b/src/corelib/Qt6WasmMacros.cmake index 9166b7fdf3d..69de55cf57f 100644 --- a/src/corelib/Qt6WasmMacros.cmake +++ b/src/corelib/Qt6WasmMacros.cmake @@ -147,6 +147,11 @@ function(_qt_internal_add_wasm_extra_exported_methods target) "SHELL:-s EXPORTED_RUNTIME_METHODS=${wasm_default_exported_methods}" ) endif() + # TODO: Remove these flags when LLVM got fixed - QTBUG-131279 + if(QT_FEATURE_thread) + target_link_options("${target}" PRIVATE + "SHELL:-s EXPORTED_FUNCTIONS=_main,__embind_initialize_bindings") + endif() endfunction() function(_qt_internal_set_wasm_export_name target) |
