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

Alex Crichton via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 18 15:01:52 PST 2026


================
@@ -79,6 +79,19 @@ static bool WantsPthread(const llvm::Triple &Triple, const ArgList &Args) {
   return WantsPthread;
 }
 
+static bool WantsComponentModelThreadContext(const llvm::Triple &Triple, const ArgList &Args) {
+  // If the target is WASIP3, then enable the
+  // component-model-thread-context feature by default, unless explicitly
+  // disabled.
+  return Triple.getOSName() == "wasip3" &&
----------------
alexcrichton wrote:

I'm not exactly sure how the various data structures in Clang work out, but would it be possible to avoid looking at the OS name here? For example above there's `Features["component-model-thread-context"] = true` and would that be able to flow into this?

Or put another way, could there be exactly one location that looks at the target, sees `wasip3`, and adjusts some defaults based on that? (this may be entirely unreasonable to expect, so feel free to dismiss)

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


More information about the cfe-commits mailing list