Skip to content

Commit b21e201

Browse files
committed
adjust memory setting for wasm, hoping to run it on mobile.
1 parent 37a0738 commit b21e201

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ if (EMSCRIPTEN)
5353
endif()
5454

5555
# TODO: Adjust memory size.
56-
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")
56+
# 4MB stack
57+
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")
5758

5859
# ENVIRONMENT=web
5960
# SINGLE_FILE=1

0 commit comments

Comments
 (0)