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

David Salinas via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 11:30:40 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:

@jhuber6 So I spent some time trying to rework this to do just what you suggested (have the HIPAMDToolChain, just use the HostTC's RocmInstallation), because it is a good idea  :-)  But ... I ran into design issues.  The member "HostTC" of HIPAMDToolChain, is a "const ToolChain &".  And the "ToolChain" class does not have a "RocmInstallation" member, it is a member of the child class "Generic_GCC". We could cast "HostTC" reference to a Generic_GCC object reference (just in the HIPAMDToolClass), but that solution doesn't feel very pretty either.

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


More information about the cfe-commits mailing list