浏览代码

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.
Ryan C. Gordon 8 月之前
父节点
当前提交
61ba8010d3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      examples/CMakeLists.txt

+ 1 - 0
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)