Skip to content

Commit af095f2

Browse files
authored
Add some test coverage of of MODULARIZE + WASM_WORKERS + closure under node. NFC (#24183)
These combinations were previously only covered by browser tests. This uncovered that MODULARIZE + WASM2SJ + WASM_WORKERS is not currently a supported configuration so this change also explictly disallows that combination. See #24184
1 parent c57d2a9 commit af095f2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/lib/libwasm_worker.js

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#if PROXY_TO_WORKER
3131
#error "-sPROXY_TO_WORKER is not supported with -sWASM_WORKERS"
3232
#endif
33+
#if WASM2JS && MODULARIZE
34+
#error "-sWASM=0 + -sMODULARIZE + -sWASM_WORKERS is not supported"
35+
#endif
3336

3437
{{{
3538
const workerSupportsFutexWait = () => AUDIO_WORKLET ? "typeof AudioWorkletGlobalScope === 'undefined'" : '1';

test/test_core.py

+4
Original file line numberDiff line numberDiff line change
@@ -9569,7 +9569,11 @@ def test_emscripten_async_load_script(self):
95699569
@node_pthreads
95709570
@no_asan('ASan does not support WASM_WORKERS')
95719571
@also_with_minimal_runtime
9572+
@also_with_modularize
95729573
def test_wasm_worker_hello(self):
9574+
if self.is_wasm2js() and '-sMODULARIZE' in self.emcc_args:
9575+
self.skipTest('WASM2JS + MODULARIZE + WASM_WORKERS is not supported')
9576+
self.maybe_closure()
95739577
self.do_run_in_out_file_test('wasm_worker/hello_wasm_worker.c', emcc_args=['-sWASM_WORKERS'])
95749578

95759579
@node_pthreads

0 commit comments

Comments
 (0)