================
@@ -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))
----------------
sbc100 wrote:

Can we just use `HasComponentModelThreadContext` here ?   (i.e. isn't 
HasComponentModelThreadContext already set according the command line flags 
already)

https://github.com/llvm/llvm-project/pull/175800
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to