[clang] [lld] [llvm] [lld][WebAssembly] WASIP3 and component model threading support (PR #175800)

Sam Clegg via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 17 09:09:11 PST 2026


================
@@ -407,10 +418,11 @@ WebAssemblyTargetInfo::getTargetBuiltins() const {
 void WebAssemblyTargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts,
                                    const TargetInfo *Aux) {
   TargetInfo::adjust(Diags, Opts, Aux);
-  // Turn off POSIXThreads and ThreadModel so that we don't predefine _REENTRANT
-  // or __STDCPP_THREADS__ if we will eventually end up stripping atomics
-  // because they are unsupported.
-  if (!HasAtomics || !HasBulkMemory) {
+  // If not using component model threading intrinsics, turn off POSIXThreads 
+  // and ThreadModel so that we don't predefine _REENTRANT or __STDCPP_THREADS__ 
+  // if we will eventually end up stripping atomics because they are unsupported.
+  if (!HasComponentModelThreadContext &&
+      (!HasAtomics || !HasBulkMemory)) {
----------------
sbc100 wrote:

Should we make it impossible to enable `HasComponentModelThreadContext` at the same time as `HasAtomics`?



https://github.com/llvm/llvm-project/pull/175800


More information about the cfe-commits mailing list