From 61ba8010d3c3c372226b3ce6af28b458fe7dda16 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 23 Nov 2024 00:01:18 -0500 Subject: [PATCH] examples: Emscripten builds should allow memory growth. Otherwise you either need to preallocate a bunch or run out of memory fast. examples/demo/04-bytepusher runs out of memory at startup without this. --- examples/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 418391d713..b886ba5df8 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -110,6 +110,7 @@ macro(add_sdl_example_executable TARGET) target_link_libraries(${TARGET} PRIVATE GL) elseif(EMSCRIPTEN) set_property(TARGET ${TARGET} PROPERTY SUFFIX ".html") + target_link_options(${TARGET} PRIVATE -sALLOW_MEMORY_GROWTH=1) endif() if(OPENGL_FOUND)