aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-30 18:42:38 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 14:23:21 -0800
commiteb66a7f2184e820830f04df95b77493458f0ab24 (patch)
treef6c86715390de34a4c0ba2cd3641828b939492c5 /emscripten.py
parent9772ac8610a2b45b99fa6e250ebf273f47ab9cb7 (diff)
only forward GLOBAL_BASE when needed
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py
index ee75bfe9..f213854e 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -292,7 +292,8 @@ def emscript(infile, settings, outfile, libraries=[]):
function_tables_defs = '\n'.join([table for table in last_forwarded_json['Functions']['tables'].itervalues()])
if settings.get('ASM_JS'):
fundamentals = ['buffer', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Float32Array', 'Float64Array']
- basics = ['abort', 'assert', 'STACKTOP', 'STACK_MAX', 'tempDoublePtr', 'ABORT', 'GLOBAL_BASE']
+ basics = ['abort', 'assert', 'STACKTOP', 'STACK_MAX', 'tempDoublePtr', 'ABORT']
+ if not settings['NAMED_GLOBALS']: basics += ['GLOBAL_BASE']
#if forwarded_json['Types']['preciseI64MathUsed']:
# basics += ['i64Math']
asm_runtime_funcs = ['stackAlloc', 'stackSave', 'stackRestore']