aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemscripten.py10
-rw-r--r--src/modules.js3
2 files changed, 8 insertions, 5 deletions
diff --git a/emscripten.py b/emscripten.py
index ce8c50f0..c755fff0 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -223,8 +223,9 @@ def emscript(infile, settings, outfile, libraries=[]):
if DEBUG: t = time.time()
# merge forwarded data
- all_exported_functions = set(settings['EXPORTED_FUNCTIONS']) # both asm.js and otherwise
- exported_implemented_functions = set()
+ if settings.get('ASM_JS'):
+ all_exported_functions = set(settings['EXPORTED_FUNCTIONS']) # both asm.js and otherwise
+ exported_implemented_functions = set()
for func_js, curr_forwarded_data in outputs:
curr_forwarded_json = json.loads(curr_forwarded_data)
forwarded_json['Types']['preciseI64MathUsed'] = forwarded_json['Types']['preciseI64MathUsed'] or curr_forwarded_json['Types']['preciseI64MathUsed']
@@ -232,8 +233,9 @@ def emscript(infile, settings, outfile, libraries=[]):
forwarded_json['Functions']['blockAddresses'][key] = value
for key in curr_forwarded_json['Functions']['indexedFunctions'].iterkeys():
indexed_functions.add(key)
- for key in curr_forwarded_json['Functions']['implementedFunctions'].iterkeys():
- if key in all_exported_functions: exported_implemented_functions.add(key)
+ if settings.get('ASM_JS'):
+ for key in curr_forwarded_json['Functions']['implementedFunctions'].iterkeys():
+ if key in all_exported_functions: exported_implemented_functions.add(key)
funcs_js = ''.join([output[0] for output in outputs])
if settings.get('ASM_JS'):
diff --git a/src/modules.js b/src/modules.js
index fd0ec35e..f9173f8e 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -318,7 +318,8 @@ var PassManager = {
Types: { preciseI64MathUsed: Types.preciseI64MathUsed },
Functions: {
blockAddresses: Functions.blockAddresses,
- indexedFunctions: Functions.indexedFunctions
+ indexedFunctions: Functions.indexedFunctions,
+ implementedFunctions: ASM_JS ? Functions.implementedFunctions : []
}
}));
}