Skip to content

Commit

Permalink
Allow more features for maybe-wasm2js and wasm-split (#22799)
Browse files Browse the repository at this point in the history
Allow more features for maybe-wasm2js and wasm-split

This is in preparation for alloing bulk memory and nontrapping-fp by
default.
Maybe-wasm2js just allows all features for simplicity (although if a
feature
unsupported by wasm2js is used, the test may fail anyway).
The wasm-split test fails when reference types are enabled; I haven't
investigated that yet, but for now we just enable the 2 we are
interested in.
  • Loading branch information
dschuff authored Oct 29, 2024
1 parent 21ba259 commit 0eb482e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -12864,7 +12864,9 @@ def test_split_module(self, customLoader, jspi):
self.assertExists('profile.data')

wasm_split = os.path.join(building.get_binaryen_bin(), 'wasm-split')
wasm_split_run = [wasm_split, '-g', '--enable-mutable-globals', '--export-prefix=%', 'test_split_module.wasm.orig', '-o1', 'primary.wasm', '-o2', 'secondary.wasm', '--profile=profile.data']
wasm_split_run = [wasm_split, '-g',
'--enable-mutable-globals', '--enable-bulk-memory', '--enable-nontrapping-float-to-int',
'--export-prefix=%', 'test_split_module.wasm.orig', '-o1', 'primary.wasm', '-o2', 'secondary.wasm', '--profile=profile.data']
if jspi:
wasm_split_run += ['--jspi', '--enable-reference-types']
self.run_process(wasm_split_run)
Expand Down
2 changes: 1 addition & 1 deletion tools/maybe_wasm2js.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

# main

cmd = [os.path.join(building.get_binaryen_bin(), 'wasm2js'), '--emscripten', wasm_file]
cmd = [os.path.join(building.get_binaryen_bin(), 'wasm2js'), '--emscripten', '-all', wasm_file]
cmd += opts
js = shared.run_process(cmd, stdout=subprocess.PIPE).stdout
# assign the instantiate function to where it will be used
Expand Down

0 comments on commit 0eb482e

Please sign in to comment.