summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains/Linux.cpp
diff options
context:
space:
mode:
authorChristian Bruel <christian.bruel@st.com>2018-09-04 15:22:13 +0000
committerChristian Bruel <christian.bruel@st.com>2018-09-04 15:22:13 +0000
commitc03910f82bb44ad9c7613849b7ea29865792bf17 (patch)
tree566ef7d00020cbea34ffbcefdfb57d7d10fb8fde /lib/Driver/ToolChains/Linux.cpp
parente2216479d40586ba0e73697705d2958862d730fd (diff)
downloadclang-c03910f82bb44ad9c7613849b7ea29865792bf17.tar.gz
Fix the -print-multi-directory flag to print the selected multilib.
Summary: Fix -print-multi-directory to print the selected multilib Reviewers: jroelofs Reviewed By: jroelofs Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D51354 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Linux.cpp')
-rw-r--r--lib/Driver/ToolChains/Linux.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
index 4e4317076f..d8786817ec 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -210,6 +210,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
: 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();
@@ -299,16 +300,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
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, Multilib,
+ addMultilibsFilePaths(D, Multilibs, SelectedMultilib,
GCCInstallation.getInstallPath(), Paths);
// Sourcery CodeBench MIPS toolchain holds some libraries under
// a biarch-like suffix of the GCC installation.
- addPathIfExists(D, GCCInstallation.getInstallPath() + Multilib.gccSuffix(),
+ addPathIfExists(D, GCCInstallation.getInstallPath() + SelectedMultilib.gccSuffix(),
Paths);
// GCC cross compiling toolchains will install target libraries which ship
@@ -330,7 +329,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
// 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 + Multilib.osSuffix(),
+ OSLibDir + SelectedMultilib.osSuffix(),
Paths);
// If the GCC installation we found is inside of the sysroot, we want to