jhuber6 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.

Maybe I'm missing something, both the Host / Device cases will initialize the 
ROCm detector, however I think for the GPU case this should be a trivial exit 
without doing any work. The *uses* of the ROCm detector should then be 
localized inside the ROCm tools I would think, at which case it's just a matter 
of reaching into the host toolchain. The AMDGPUToolChain does not have a host 
toolchain because it's the base class without ROCm information so it shouldn't 
have any dependencies on it.

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

Reply via email to