[clang] Remove Linux search paths on Windows (PR #113628)

David Salinas via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 18 09:29:09 PST 2024


================
@@ -6440,7 +6440,8 @@ 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 = std::make_unique<toolchains::ROCMToolChain>(*this, Target, Args,
+                                                       Target.isOSWindows());
----------------
david-salinas wrote:

Right, we call it "HostTriple", but in the case for a Device side ToolChain, the triple passed to the TC's ctor (which is the same triple passed to the RID ctor) is going to be the device triple, which is always (I think) amdgcn-amd-amdhsa, or at least definitely not Windows.  We can use the TC's triple for removing the linux search paths for Host side.  But the problem is that this doesn't work when we create the Device TC, and it's RID.

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


More information about the cfe-commits mailing list