aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-01 17:47:20 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-03 14:41:31 -0700
commit8fffbc9202a0d66d65b052d84b4b61d86d398cce (patch)
tree6a5ca87d4bb6cedd8958b341243407e15f5a1c89 /emcc
parent35386a61513fe7c9f49eefb7075f0c4dc7953e81 (diff)
always keep malloc and free alive and exported, for internal use and other modules
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc5
1 files changed, 5 insertions, 0 deletions
diff --git a/emcc b/emcc
index eea3b782..21f8f914 100755
--- a/emcc
+++ b/emcc
@@ -1117,6 +1117,11 @@ try:
input_files.append(shared.path_from_root('third_party', 'stb_image.c'))
shared.Settings.EXPORTED_FUNCTIONS += ['_stbi_load', '_stbi_load_from_memory', '_stbi_image_free']
+ for required_export in ['_malloc', '_free']:
+ # always need malloc and free to be kept alive and exported, for internal use and other modules
+ if required_export not in shared.Settings.EXPORTED_FUNCTIONS:
+ shared.Settings.EXPORTED_FUNCTIONS.append(required_export)
+
## Compile source code to bitcode
logging.debug('compiling to bitcode')