Fix using emscripten 3.1.27+

emscripten 3.1.27 reduced the stack size from 5MB to 64KB. This caused
run-time errors: Uncaught RuntimeError: index out of bounds

Co-authored-by: James Darpinian <jdarpinian@gmail.com>
This commit is contained in:
Zack Middleton 2024-06-09 01:21:58 -05:00
parent 6f5c038947
commit 17cadb5369

View file

@ -1062,7 +1062,7 @@ ifeq ($(PLATFORM),emscripten)
USE_RENDERER_DLOPEN=0
BASE_CFLAGS=-fPIC -s USE_SDL=2
LDFLAGS=-s TOTAL_MEMORY=256mb -s MAX_WEBGL_VERSION=2 --preload-file $(BASEGAME)
LDFLAGS=-s STACK_SIZE=5MB -s TOTAL_MEMORY=256MB -s MAX_WEBGL_VERSION=2 --preload-file $(BASEGAME)
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM)