diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-21 16:04:52 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-21 16:04:52 -0700 |
commit | bcfa7289f5df48f40e59542f66c0504cfae3a19b (patch) | |
tree | dd265d930a785845090e4f300a304aa9b4629af2 /scripts | |
parent | e9ba8d7dfe1754cb48b1efeb6eb9572bd6388a4e (diff) | |
download | binaryen-bcfa7289f5df48f40e59542f66c0504cfae3a19b.tar.gz binaryen-bcfa7289f5df48f40e59542f66c0504cfae3a19b.tar.bz2 binaryen-bcfa7289f5df48f40e59542f66c0504cfae3a19b.zip |
fix spidermonkify
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/spidermonkify.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/spidermonkify.py b/scripts/spidermonkify.py index 623015fde..33480d589 100644 --- a/scripts/spidermonkify.py +++ b/scripts/spidermonkify.py @@ -51,11 +51,14 @@ js = js.replace("'" + base_wast_target + "'", "'" + base_wasm_target + "'") open(js_target, 'w').write(js) shutil.copyfile(wast_target + '.mappedGlobals', wasm_target + '.mappedGlobals') -# convert to binary using spidermonkey, something like -#mozjs -e 'os.file.writeTypedArrayToFile("moz.wasm", -#new Uint8Array(wasmTextToBinary(os.file.readFile("test/hello_world.wast"))))' -#investigate with -#>>> map(chr, map(ord, open('moz.wasm').read())) +# convert to binary using spidermonkey +''' +using something like +mozjs -e 'os.file.writeTypedArrayToFile("moz.wasm", +new Uint8Array(wasmTextToBinary(os.file.readFile("test/hello_world.wast"))))' +investigate with +>>> map(chr, map(ord, open('moz.wasm').read())) +''' subprocess.check_call( emscripten.shared.SPIDERMONKEY_ENGINE + ['-e', 'os.file.writeTypedArrayToFile("' + wasm_target + |