summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtWasmHelpers.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/QtWasmHelpers.cmake b/cmake/QtWasmHelpers.cmake
index 592db0d0db..ca6cadff93 100644
--- a/cmake/QtWasmHelpers.cmake
+++ b/cmake/QtWasmHelpers.cmake
@@ -28,8 +28,12 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
# (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
# at build time. Further, browsers limit the maximum initial memory size to 1GB.
# QT_WASM_INITIAL_MEMORY must be a multiple of 64KB (i.e. 65536)
- if(NOT DEFINED QT_WASM_INITIAL_MEMORY AND QT_FEATURE_thread)
- set(QT_WASM_INITIAL_MEMORY "1GB")
+ if(NOT DEFINED QT_WASM_INITIAL_MEMORY)
+ if(QT_FEATURE_thread)
+ set(QT_WASM_INITIAL_MEMORY "1GB")
+ else()
+ set(QT_WASM_INITIAL_MEMORY "20MB") # emscripten default is 16MB, we need slightly more sometimes
+ endif()
endif()
if(DEFINED QT_WASM_INITIAL_MEMORY)