Skip to content

Don't pass -sWASM_WORKERS when building libc-mt (and -mt variants of other MTLibrary libraries). NFC#26474

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:libc_wasm_workers
Mar 17, 2026
Merged

Don't pass -sWASM_WORKERS when building libc-mt (and -mt variants of other MTLibrary libraries). NFC#26474
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:libc_wasm_workers

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Mar 17, 2026

This library gets linking into -pthreads build where wasm worker APIs are not available.

If we had code in libc that looks like this it would fail to link in that case:

 #ifdef __EMSCRIPTEN_WASM_WORKERS__ 
 use_wasm_worker_api();
 #endif

The fact that this is worked thus far only because we don't use that macro anywhere in libc today.

This library gets linking into `-pthreads` build where wasm worker APIs
are not available.

If we have code in libc that looks like this it would fail to link in
that case:

```
use_wasm_worker_api();
```

The fact that this is worked thus far only because we don't use that
macro anywhere in libc today.
@sbc100 sbc100 enabled auto-merge (squash) March 17, 2026 22:48
@sbc100 sbc100 requested review from dschuff, juj and kripken March 17, 2026 22:48
@sbc100 sbc100 changed the title Don't pass -sWASM_WORKERS when building libc-mt. NFC Don't pass -sWASM_WORKERS when building libc-mt (and -mt variants of other MTLibrary libraries). NFC Mar 17, 2026
@sbc100 sbc100 merged commit 15a10db into emscripten-core:main Mar 17, 2026
38 checks passed
@sbc100 sbc100 deleted the libc_wasm_workers branch March 17, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants