Skip to content

Commit b8b8194

Browse files
authored
Simplify pthreads + dylink warning. NFC (#25638)
1 parent eb36294 commit b8b8194

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

test/test_other.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,7 @@ def test_dylink_pthread_static_data(self):
22432243

22442244
def test_dylink_pthread_warning(self):
22452245
err = self.expect_fail([EMCC, '-Werror', '-sMAIN_MODULE', '-pthread', test_file('hello_world.c')])
2246-
self.assertContained('error: -sMAIN_MODULE + pthreads is experimental', err)
2246+
self.assertContained('error: dynamic linking + pthreads is experimental', err)
22472247

22482248
@node_pthreads
22492249
def test_dylink_pthread_em_asm(self):

tools/link.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -522,14 +522,9 @@ def get_worker_js_suffix():
522522

523523

524524
def setup_pthreads():
525-
if settings.RELOCATABLE:
526-
# pthreads + dynamic linking has certain limitations
527-
if settings.SIDE_MODULE:
528-
diagnostics.warning('experimental', '-sSIDE_MODULE + pthreads is experimental')
529-
elif settings.MAIN_MODULE:
530-
diagnostics.warning('experimental', '-sMAIN_MODULE + pthreads is experimental')
531-
elif settings.LINKABLE:
532-
diagnostics.warning('experimental', '-sLINKABLE + pthreads is experimental')
525+
# pthreads + dynamic linking has certain limitations
526+
if settings.SIDE_MODULE or settings.MAIN_MODULE or settings.RELOCATABLE:
527+
diagnostics.warning('experimental', 'dynamic linking + pthreads is experimental')
533528
if settings.ALLOW_MEMORY_GROWTH and not settings.GROWABLE_ARRAYBUFFERS:
534529
diagnostics.warning('pthreads-mem-growth', '-pthread + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271')
535530

0 commit comments

Comments
 (0)