Skip to content

Commit 5a40f40

Browse files
committed
Stop generating empty .worker.js in pthreads builds
We stopped using a separate worker file back in #21701. That was released in 3.1.58 back in April. This change ends the transition period by no longer generating a dummy/useless worker.js file alongside the output.
1 parent 16a0bf1 commit 5a40f40

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

test/test_other.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14881,20 +14881,9 @@ def test_embind_no_duplicate_symbols(self):
1488114881
create_file('b.cpp', '#include <emscripten/bind.h>')
1488214882
self.run_process([EMXX, '-std=c++23', '-lembind', 'a.cpp', 'b.cpp'])
1488314883

14884-
def test_legacy_pthread_worker_js(self):
14885-
self.do_runf('hello_world.c', emcc_args=['-pthread', '-sSTRICT'])
14886-
self.assertNotExists('hello_world.worker.js')
14887-
self.do_runf('hello_world.c', emcc_args=['-pthread'])
14888-
self.assertExists('hello_world.worker.js')
14889-
os.mkdir('out')
14890-
self.do_runf('hello_world.c', output_basename='out/foo', emcc_args=['-pthread'])
14891-
self.assertExists('out/foo.js')
14892-
self.assertExists('out/foo.worker.js')
14893-
1489414884
def test_no_pthread(self):
1489514885
self.do_runf('hello_world.c', emcc_args=['-pthread', '-no-pthread'])
1489614886
self.assertExists('hello_world.js')
14897-
self.assertNotExists('hello_world.worker.js')
1489814887
self.assertNotContained('Worker', read_file('hello_world.js'))
1489914888

1490014889
def test_sysroot_includes_first(self):

tools/link.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,15 +2073,6 @@ def phase_final_emitting(options, state, target, wasm_target):
20732073
return
20742074

20752075
target_dir = os.path.dirname(os.path.abspath(target))
2076-
if settings.PTHREADS and not settings.STRICT and not settings.SINGLE_FILE:
2077-
worker_file = shared.replace_suffix(target, get_worker_js_suffix())
2078-
write_file(worker_file, '''\
2079-
// This file is no longer used by emscripten and has been created as a placeholder
2080-
// to allow build systems to transition away from depending on it.
2081-
//
2082-
// Future versions of emscripten will likely stop generating this file at all.
2083-
throw new Error('Dummy worker.js file should never be used');
2084-
''')
20852076

20862077
# Deploy the Wasm Worker bootstrap file as an output file (*.ww.js)
20872078
if settings.WASM_WORKERS == 1:

0 commit comments

Comments
 (0)