wasm: set stack size to 5MB again

Recent Emscripten 3.1.27 reduces the stack size to 64KB,
which is way to small for Qt-based applications.

Restore the previous stack size (5 MB) by setting STACK_SIZE.

Change-Id: I6c25e31b32dc1d551fa423655fcef4891830bcd1
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
Morten Sørvig 2023-03-03 15:46:04 +01:00 committed by Morten Johan Sørvig
parent 28d5da386f
commit ba724a2ded
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,8 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
target_link_options("${wasmTarget}" INTERFACE
"SHELL:-s MAX_WEBGL_VERSION=2"
"SHELL:-s FETCH=1"
"SHELL:-s WASM_BIGINT=1")
"SHELL:-s WASM_BIGINT=1"
"SHELL:-s STACK_SIZE=5MB")
target_link_libraries("${wasmTarget}" INTERFACE embind)

View File

@ -36,7 +36,8 @@ EMCC_COMMON_LFLAGS += \
-s FETCH=1 \
-s MODULARIZE=1 \
-s EXPORT_NAME=createQtAppInstance \
-s WASM_BIGINT=1
-s WASM_BIGINT=1 \
-s STACK_SIZE=5MB
# The -s arguments can also be used with release builds,
# but are here in debug for clarity.