Skip to content

Remove support for non-standard -no-pthreads command line flag - #27546

Merged
dschuff merged 1 commit into
emscripten-core:mainfrom
sbc100:no_pthrads
Aug 17, 2026
Merged

Remove support for non-standard -no-pthreads command line flag#27546
dschuff merged 1 commit into
emscripten-core:mainfrom
sbc100:no_pthrads

Conversation

@sbc100

@sbc100 sbc100 commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

It turns out this was never really supported by LLVM in the way I thought it was when I added support here:
llvm/llvm-project#216378

I'm pretty we never advertised the availability of this non-standard flag anywhere so I think removing it should be low risk. See #20723 for where it was added.

It turns out this was never really supported by LLVM in the
way I thought it was when I added support here:
llvm/llvm-project#216378
@dschuff

dschuff commented Aug 17, 2026

Copy link
Copy Markdown
Member

Since we've removed the support from LLVM then definitely LGTM for removing the test for right now. Given that we have this test though I wonder if this flag actually had users. If it really did have the effect we want, it doesn't seem too onerous to keep support in LLVM if it was actually useful?

@sbc100

sbc100 commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

Yes @RReverser certainly had a use for in #20720. Hopefully he found another way to solve that issue? We could continue to try to honor in emcc-only (i.e. not in clang itself), but I would rather not diverge if possible.

@dschuff

dschuff commented Aug 17, 2026

Copy link
Copy Markdown
Member

Well if we're going to support it, it would certainly make sense to do it in clang upstream rather than in emcc. Your patch to remove it from upstream was pretty trivial, so I'm saying if it was already WAI and has a benefit, then we could consider just reverting that. It would be a divergence from other targets but there are plenty of those already.

@sbc100

sbc100 commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

Well if we're going to support it, it would certainly make sense to do it in clang upstream rather than in emcc. Your patch to remove it from upstream was pretty trivial, so I'm saying if it was already WAI and has a benefit, then we could consider just reverting that. It would be a divergence from other targets but there are plenty of those already.

The problem is that the the upstream support was basically not WAI, at least for for compiling.

The shared code that calls clang cc1 is here and it ignores -no-pthead (on all platforms): https://github.com/llvm/llvm-project/blob/a7ef89ad9796e6de3a085ec75a13f0dfec5a8059/clang/lib/Driver/ToolChains/Clang.cpp#L7378

Also, no other frontends were taking any action based on this flag, so wasm the only outlier.

@dschuff

dschuff commented Aug 17, 2026

Copy link
Copy Markdown
Member

OK yeah if it was always broken then it makes sense just to remove it

@dschuff

dschuff commented Aug 17, 2026

Copy link
Copy Markdown
Member

Going to go ahead and merge this now to fix the roller

@dschuff
dschuff merged commit c6285f2 into emscripten-core:main Aug 17, 2026
42 checks passed
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