aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-15 18:18:50 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-16 10:59:16 -0700
commita3acbcd3f0ab9ea5d1f25df9ec9ea4a8ce44f556 (patch)
tree5cc6385687e35f3bffec7b00a56dd355123b0ac0 /emscripten.py
parent56d495e7ab8e999e2928dbc26b9fdedf0411590e (diff)
pick up function indexing that only happens in pre
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py
index 1b1284c7..a156ca73 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -190,6 +190,11 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
open(forwarded_file, 'w').write(forwarded_data)
if DEBUG: print >> sys.stderr, ' emscript: phase 1 took %s seconds' % (time.time() - t)
+ indexed_functions = set()
+ forwarded_json = json.loads(forwarded_data)
+ for key in forwarded_json['Functions']['indexedFunctions'].iterkeys():
+ indexed_functions.add(key)
+
# Phase 2 - func
cores = int(os.environ.get('EMCC_CORES') or multiprocessing.cpu_count())
@@ -203,8 +208,6 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
chunk_size = MAX_CHUNK_SIZE # if 1 core, just use the max chunk size
if DEBUG: t = time.time()
- forwarded_json = json.loads(forwarded_data)
- indexed_functions = set()
if settings.get('ASM_JS'):
settings['EXPORTED_FUNCTIONS'] = forwarded_json['EXPORTED_FUNCTIONS']
save_settings()