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

Sy Brand via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 17 09:51:28 PST 2026


================
@@ -160,9 +168,17 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA,
 
   AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
 
-  if (WantsPthread(ToolChain.getTriple(), Args))
+  if (WantsSharedMemory(ToolChain.getTriple(), Args))
     CmdArgs.push_back("--shared-memory");
 
+  // Enable component model thread context by default for wasip3
+  bool DefaultComponentModelThreadContext =
+      ToolChain.getTriple().getOSName() == "wasip3";
+  if (Args.hasFlag(options::OPT_mcomponent_model_thread_context,
+                   options::OPT_mno_component_model_thread_context,
+                   DefaultComponentModelThreadContext))
----------------
TartanLlama wrote:

I didn't see a way to get access to the `WebAssemblyTargetInfo` here, is there a way I missed?

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


More information about the cfe-commits mailing list