Skip to content

Commit 0eb482e

Browse files
authored
Allow more features for maybe-wasm2js and wasm-split (#22799)
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.
1 parent 21ba259 commit 0eb482e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/test_other.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -12864,7 +12864,9 @@ def test_split_module(self, customLoader, jspi):
1286412864
self.assertExists('profile.data')
1286512865

1286612866
wasm_split = os.path.join(building.get_binaryen_bin(), 'wasm-split')
12867-
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']
12867+
wasm_split_run = [wasm_split, '-g',
12868+
'--enable-mutable-globals', '--enable-bulk-memory', '--enable-nontrapping-float-to-int',
12869+
'--export-prefix=%', 'test_split_module.wasm.orig', '-o1', 'primary.wasm', '-o2', 'secondary.wasm', '--profile=profile.data']
1286812870
if jspi:
1286912871
wasm_split_run += ['--jspi', '--enable-reference-types']
1287012872
self.run_process(wasm_split_run)

tools/maybe_wasm2js.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# main
4343

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

0 commit comments

Comments
 (0)