@@ -2766,15 +2766,6 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const {
2766
2766
}
2767
2767
}
2768
2768
2769
- static void addMultilibsFilePaths (const Driver &D, const MultilibSet &Multilibs,
2770
- const Multilib &Multilib,
2771
- StringRef InstallPath,
2772
- ToolChain::path_list &Paths) {
2773
- if (const auto &PathsCallback = Multilibs.filePathsCallback ())
2774
- for (const auto &Path : PathsCallback (Multilib))
2775
- addPathIfExists (D, InstallPath + Path, Paths);
2776
- }
2777
-
2778
2769
void Generic_GCC::PushPPaths (ToolChain::path_list &PPaths) {
2779
2770
// Cross-compiling binutils and GCC installations (vanilla and openSUSE at
2780
2771
// least) put various tools in a triple-prefixed directory off of the parent
@@ -2801,12 +2792,13 @@ void Generic_GCC::AddMultilibPaths(const Driver &D,
2801
2792
const std::string &LibPath =
2802
2793
std::string (GCCInstallation.getParentLibPath ());
2803
2794
2804
- // Add toolchain / multilib specific file paths.
2805
- addMultilibsFilePaths (D, Multilibs, SelectedMultilib,
2806
- GCCInstallation.getInstallPath (), Paths);
2807
-
2808
2795
// Sourcery CodeBench MIPS toolchain holds some libraries under
2809
2796
// a biarch-like suffix of the GCC installation.
2797
+ if (const auto &PathsCallback = Multilibs.filePathsCallback ())
2798
+ for (const auto &Path : PathsCallback (SelectedMultilib))
2799
+ addPathIfExists (D, GCCInstallation.getInstallPath () + Path, Paths);
2800
+
2801
+ // Add lib/gcc/$triple/$version, with an optional /multilib suffix.
2810
2802
addPathIfExists (
2811
2803
D, GCCInstallation.getInstallPath () + SelectedMultilib.gccSuffix (),
2812
2804
Paths);
0 commit comments