aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-30 12:14:49 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-30 12:14:49 -0800
commit094cbfd615be4eaa3222ab08b87ea3719a3089ea (patch)
tree9e905043eeb101ee40c2d5bfda683a9c22ffc810
parent01b837d0ad97a01d0d46f518215b85a1b87ba9c3 (diff)
disable jcache in fastcomp, and fake emscripten_jcache_printf
-rwxr-xr-xemcc3
-rw-r--r--tools/shared.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/emcc b/emcc
index baa20969..704740e8 100755
--- a/emcc
+++ b/emcc
@@ -1206,6 +1206,9 @@ try:
assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32'
assert not bind, 'embind not supported in fastcomp yet'
+ if jcache:
+ logging.warning('jcache is not supported in fastcomp (you should not need it anyhow), disabling')
+ jcache = False
if shared.Settings.ASM_JS:
assert opt_level >= 1 or os.environ.get('EMCC_FAST_COMPILER'), 'asm.js requires -O1 or above'
diff --git a/tools/shared.py b/tools/shared.py
index eb1c63be..e16d191e 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1513,6 +1513,8 @@ class Building:
text = m.groups(0)[0]
assert text.count('(') == 1 and text.count(')') == 1, 'must have simple expressions in emscripten_jcache_printf calls, no parens'
assert text.count('"') == 2, 'must have simple expressions in emscripten_jcache_printf calls, no strings as varargs parameters'
+ if os.environ.get('EMCC_FAST_COMPILER'): # fake it in fastcomp
+ return text.replace('emscripten_jcache_printf', 'printf')
start = text.index('(')
end = text.rindex(')')
args = text[start+1:end].split(',')