aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-31 12:07:02 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-31 12:07:02 -0800
commitac9746686208c6d1a00c90830a93cc5a620bc11e (patch)
tree068a492ec3bed31a8038a83cd9c31b77bb81c121
parent2325baf34e144586d71251f31c01c7f2abfdb8b7 (diff)
export malloc and free from asm, if present
-rwxr-xr-xemscripten.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py
index 27323fcb..50463711 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -231,6 +231,8 @@ def emscript(infile, settings, outfile, libraries=[]):
# merge forwarded data
if settings.get('ASM_JS'):
all_exported_functions = set(settings['EXPORTED_FUNCTIONS']) # both asm.js and otherwise
+ for additional_export in ['_malloc', '_free']: # additional functions to export from asm, if they are implemented
+ all_exported_functions.add(additional_export)
exported_implemented_functions = set()
for func_js, curr_forwarded_data in outputs:
curr_forwarded_json = json.loads(curr_forwarded_data)