michaelplatings added a comment. In D142933#4099043 <https://reviews.llvm.org/D142933#4099043>, @Joe wrote:
> I did briefly try to pass a ToolChain to Gnu.cpp functions, but it became > intrusive and had to add it in 5+ places, so unless I'm missing a trick to > get the ToolChain from the Driver, my vote would go to the former. I looked into moving `getMultiSelectionFlags` into the `Driver` class but it felt wrong. I think the place you need to call `getMultiSelectionFlags` is from `findRISCVBareMetalMultilibs` and `findRISCVMultilibs`. They will indeed need changing to take a `const ToolChain&`. They are called from `ScanGCCForMultilibs` which is a method of `GCCInstallationDetector`. `GCCInstallationDetector` could have a `const ToolChain&` member. `GCCInstallationDetector` is only instantiated from the `Generic_GCC` constructor - `Generic_GCC` is a subclass of `ToolChain` so it can pass `*this` to the `GCCInstallationDetector` constructor. I think that change would not be too intrusive. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/ https://reviews.llvm.org/D142933 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits