================
@@ -6405,7 +6424,12 @@ const ToolChain &Driver::getToolChain(const ArgList 
&Args,
       TC = std::make_unique<toolchains::NVPTXToolChain>(*this, Target, Args);
       break;
     case llvm::Triple::AMDHSA:
-      TC = std::make_unique<toolchains::ROCMToolChain>(*this, Target, Args);
+      TC =
+          llvm::any_of(Inputs,
+                       [](auto &Input) { return types::isOpenCL(Input.first); 
})
+              ? std::make_unique<toolchains::ROCMToolChain>(*this, Target, 
Args)
----------------
jhuber6 wrote:

In the mixed case, all of them will be the `ROCMToolChain`, which I'm okay 
with. `ROCMToolChain` is what currently is invoked, the main difference is that 
it includes a lot of stuff in the ROCMToolChain while we want straight C/C++ to 
be freestanding.

https://github.com/llvm/llvm-project/pull/99687
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to