aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-03 14:31:57 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-03 14:41:31 -0700
commit851ef39b19f206ed71d515a639ecc7c9c7ef28f7 (patch)
tree6535c3d26a88fe1ca91c97b99436496c09eadfe1 /emcc
parent8f7e8962758803120bd3dcbbf059d88d1c892121 (diff)
handle the case of EXPORTED_FUNCTIONS=@
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc9
1 files changed, 6 insertions, 3 deletions
diff --git a/emcc b/emcc
index 21f8f914..93621a83 100755
--- a/emcc
+++ b/emcc
@@ -1117,10 +1117,13 @@ 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']:
+ if type(shared.Settings.EXPORTED_FUNCTIONS) in (list, tuple):
# 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)
+ for required_export in ['_malloc', '_free']:
+ if required_export not in shared.Settings.EXPORTED_FUNCTIONS:
+ shared.Settings.EXPORTED_FUNCTIONS.append(required_export)
+ else:
+ logging.debug('using response file for EXPORTED_FUNCTIONS, make sure it includes _malloc and _free')
## Compile source code to bitcode