================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits