summaryrefslogtreecommitdiff
path: root/scripts/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-11 15:57:05 -0700
committerGitHub <noreply@github.com>2019-04-11 15:57:05 -0700
commitfc3b8eed2b9fb2aa7e55ac833ea08cf7eae46a0a (patch)
tree2a8787a3143c2c437905fc9533c7575cb03604a1 /scripts/test
parentb769b4ede65eb014376b67f78ba5e6cb04e0cef8 (diff)
downloadbinaryen-fc3b8eed2b9fb2aa7e55ac833ea08cf7eae46a0a.tar.gz
binaryen-fc3b8eed2b9fb2aa7e55ac833ea08cf7eae46a0a.tar.bz2
binaryen-fc3b8eed2b9fb2aa7e55ac833ea08cf7eae46a0a.zip
wasm2js: emscripten glue option (#2000)
Add a wasm2js option for the glue to be in emscripten-compatible format (as opposed to ES6). This does a few things so far: * Emit START_FUNCTIONS, END_FUNCTIONS markers in the code, for future use in the optimizer. * Emit the glue as a function to be called from emscripten.
Diffstat (limited to 'scripts/test')
-rwxr-xr-xscripts/test/wasm2js.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py
index afa399da2..2892da278 100755
--- a/scripts/test/wasm2js.py
+++ b/scripts/test/wasm2js.py
@@ -52,6 +52,8 @@ def test_wasm2js_output():
print '..', wasm
cmd = WASM2JS + [os.path.join(options.binaryen_test, wasm)]
+ if 'emscripten' in wasm:
+ cmd += ['--emscripten']
out = run_command(cmd)
fail_if_not_identical_to_file(out, expected_file)
@@ -129,6 +131,8 @@ def update_wasm2js_tests():
print '..', wasm
cmd = WASM2JS + [os.path.join('test', wasm)]
+ if 'emscripten' in wasm:
+ cmd += ['--emscripten']
out = run_command(cmd)
with open(expected_file, 'w') as o:
o.write(out)