From 17cadb5369124c1c5f31a931fb248b7365e477d2 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 9 Jun 2024 01:21:58 -0500 Subject: [PATCH] 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 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 21d5370d..530c97d5 100644 --- a/Makefile +++ b/Makefile @@ -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)