aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-07-31 11:12:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-31 11:14:04 -0700
commit9854bb1c7b9ae9cd793f5e2cec09788066ce8dd6 (patch)
tree40be8ab125862c403c55b057d690e57f1e740d13 /emcc
parentc00b2191f3c9cf7c3f68325940ffd7dbf4253bc2 (diff)
support for stb-image
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc4
1 files changed, 4 insertions, 0 deletions
diff --git a/emcc b/emcc
index 46dca960..0b982fbe 100755
--- a/emcc
+++ b/emcc
@@ -1087,6 +1087,10 @@ try:
if shared.Settings.DLOPEN_SUPPORT:
shared.Settings.LINKABLE = 1
+ if shared.Settings.STB_IMAGE and final_suffix in JS_CONTAINING_SUFFIXES:
+ 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']
+
## Compile source code to bitcode
logging.debug('compiling to bitcode')