Skip to content

Commit 52253a0

Browse files
authored
Fix browser.test_binaryen_async for WasmFS (#19607)
That test checks we can synchronously compile, but the WasmFS code size is too big for Chrome to allow it. Switch to -O3 which emits small-enough code to work around that. (Eventually we hope to improve code size here, but there's not really any harm in keeping this at -O3 anyhow, so I didn't add a TODO to change that.)
1 parent 5f77c71 commit 52253a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/test_browser.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4366,8 +4366,11 @@ def test_binaryen_async(self):
43664366
(['-O1'], 1),
43674367
(['-O2'], 1),
43684368
(['-O3'], 1),
4369-
(['-sWASM_ASYNC_COMPILATION'], 1), # force it on
4370-
(['-O1', '-sWASM_ASYNC_COMPILATION=0'], 0), # force it off
4369+
# force it on
4370+
(['-sWASM_ASYNC_COMPILATION'], 1),
4371+
# force it off. note that we use -O3 here to make the binary small enough
4372+
# for chrome to allow compiling it synchronously
4373+
(['-O3', '-sWASM_ASYNC_COMPILATION=0'], 0),
43714374
]:
43724375
print(opts, returncode)
43734376
self.btest_exit('binaryen_async.c', assert_returncode=returncode, args=common_args + opts)

0 commit comments

Comments
 (0)