protected:
MultilibSet Multilibs;
- Multilib SelectedMultilib;
ToolChain(const Driver &D, const llvm::Triple &T,
const llvm::opt::ArgList &Args);
const MultilibSet &getMultilibs() const { return Multilibs; }
- const Multilib &getMultilib() const { return SelectedMultilib; }
-
const SanitizerArgs& getSanitizerArgs() const;
const XRayArgs& getXRayArgs() const;
}
if (C.getArgs().hasArg(options::OPT_print_multi_directory)) {
- const Multilib &Multilib = TC.getMultilib();
- if (Multilib.gccSuffix().empty())
- llvm::outs() << ".\n";
- else {
- StringRef Suffix(Multilib.gccSuffix());
- assert(Suffix.front() == '/');
- llvm::outs() << Suffix.substr(1) << "\n";
+ for (const Multilib &Multilib : TC.getMultilibs()) {
+ if (Multilib.gccSuffix().empty())
+ llvm::outs() << ".\n";
+ else {
+ StringRef Suffix(Multilib.gccSuffix());
+ assert(Suffix.front() == '/');
+ llvm::outs() << Suffix.substr(1) << "\n";
+ }
}
return false;
}
: Generic_ELF(D, Triple, Args) {
GCCInstallation.init(Triple, Args);
Multilibs = GCCInstallation.getMultilibs();
- SelectedMultilib = GCCInstallation.getMultilib();
llvm::Triple::ArchType Arch = Triple.getArch();
std::string SysRoot = computeSysRoot();
if (GCCInstallation.isValid()) {
const llvm::Triple &GCCTriple = GCCInstallation.getTriple();
const std::string &LibPath = GCCInstallation.getParentLibPath();
+ const Multilib &Multilib = GCCInstallation.getMultilib();
+ const MultilibSet &Multilibs = GCCInstallation.getMultilibs();
// Add toolchain / multilib specific file paths.
- addMultilibsFilePaths(D, Multilibs, SelectedMultilib,
+ addMultilibsFilePaths(D, Multilibs, Multilib,
GCCInstallation.getInstallPath(), Paths);
// Sourcery CodeBench MIPS toolchain holds some libraries under
// a biarch-like suffix of the GCC installation.
- addPathIfExists(D, GCCInstallation.getInstallPath() + SelectedMultilib.gccSuffix(),
+ addPathIfExists(D, GCCInstallation.getInstallPath() + Multilib.gccSuffix(),
Paths);
// GCC cross compiling toolchains will install target libraries which ship
// Note that this matches the GCC behavior. See the below comment for where
// Clang diverges from GCC's behavior.
addPathIfExists(D, LibPath + "/../" + GCCTriple.str() + "/lib/../" +
- OSLibDir + SelectedMultilib.osSuffix(),
+ OSLibDir + Multilib.osSuffix(),
Paths);
// If the GCC installation we found is inside of the sysroot, we want to
+++ /dev/null
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: -target i386-none-linux \
-// RUN: -print-multi-directory \
-// RUN: | FileCheck --check-prefix=CHECK-X86-MULTILIBS %s
-
-// CHECK-X86-MULTILIBS: 32
-// CHECK-X86-MULTILIBS-NOT: x32
-// CHECK-X86-MULTILIBS-NOT: .
-
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: -target i386-none-linux -m64 \
-// RUN: -print-multi-directory \
-// RUN: | FileCheck --check-prefix=CHECK-X86_64-MULTILIBS %s
-
-// CHECK-X86_64-MULTILIBS: .
-// CHECK-X86_64-MULTILIBS-NOT: x32
-// CHECK-X86_64-MULTILIBS-NOT: 32
-
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: -target arm-linux-androideabi21 -stdlib=libstdc++ \
-// RUN: -mthumb \
-// RUN: -B%S/Inputs/basic_android_ndk_tree \
-// RUN: --sysroot=%S/Inputs/basic_android_ndk_tree/sysroot \
-// RUN: -print-multi-directory \
-// RUN: | FileCheck --check-prefix=CHECK-ARM-MULTILIBS %s
-
-// CHECK-ARM-MULTILIBS: thumb
-// CHECK-ARM-MULTILIBS-NOT: .