diff --git a/web/CMakeLists.txt b/web/CMakeLists.txt index b9d1849e..334ce96c 100644 --- a/web/CMakeLists.txt +++ b/web/CMakeLists.txt @@ -53,7 +53,8 @@ if (EMSCRIPTEN) endif() # TODO: Adjust memory size. -set_target_properties(${BUILD_TARGET} PROPERTIES LINK_FLAGS "-s INITIAL_MEMORY=32MB -s TOTAL_MEMORY=256MB -sTOTAL_STACK=32MB -sASSERTIONS -s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -sMODULARIZE -sEXPORT_ES6=1 --bind") +# 4MB stack +set_target_properties(${BUILD_TARGET} PROPERTIES LINK_FLAGS "-sENVIRONMENT='web,worker' -sSTACK_SIZE=4000000 -sASSERTIONS -s ALLOW_MEMORY_GROWTH=1 -sMODULARIZE=1 -sEXPORT_ES6 -sINVOKE_RUN=0 --bind") # ENVIRONMENT=web # SINGLE_FILE=1