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

David Salinas via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 20 10:19:27 PST 2024


david-salinas wrote:

> Is there an issue with simply using the `HostTC` for everything? I feel like that's the solution to this mess, since the `HostTC` would always know whether or not the target is Windows without us needing to forward a bunch of stuff.

Yes, that would work too.  But currently the HostTC is only available/accessible in HIPAMDToolChain.  With the way we instantiate the RID, we need to tell the RID ctor to hold off on creating the Search Paths if the HostTC is Windows.  And the RID ctor is called all the way up in the Generic_GCC ctor.  We would still have to pass the HostTC all the way through class hierarchy (HIPAMDToolChain -> ROCMToolChin -> AMDGPUToolChain -> Generic_ELF).  My thinking was that passing a bool would be a little less intrusive/heavy of a change. Though, we would only be passing a reference to the HostTC.  

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


More information about the cfe-commits mailing list