Skip to content

Commit

Permalink
Adds _malloc to emscripten EXPORTED_FUNCTIONS (#335)
Browse files Browse the repository at this point in the history
Fixes 'b._malloc is not a function' when building with emscripten 2.0.4
  • Loading branch information
ianpurvis authored Sep 16, 2020
1 parent f1e1475 commit a4bec93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ set(EMCC_ARGS
-O3
-s ALLOW_MEMORY_GROWTH=${ALLOW_MEMORY_GROWTH}
-s ALLOW_TABLE_GROWTH=1
-s EXPORTED_FUNCTIONS=["_malloc"]
-s EXPORTED_RUNTIME_METHODS=["UTF8ToString"]
-s EXTRA_EXPORTED_RUNTIME_METHODS=["addFunction"]
-s EXPORT_NAME="Ammo"
Expand Down

0 comments on commit a4bec93

Please sign in to comment.