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

Personally I find that features work best when they're additive and don't clash 
with each other since end users don't always have the greatest degree of 
control over what's enabled where and how it's enabled and such. Given that I'd 
say that ideally the features would continue to be orthogonal, and wherever the 
clash might otherwise be problematic that might be reasonable to require 
specifying some other option to disambiguate with some reasonable fallback or 
something like that.

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