aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-04 21:22:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-04 21:22:42 +0000
commit6ab8e6231f75500ea4d0c7755032ffc98e71a25f (patch)
tree35389fb8d650d4d5d2449711a3a698c8013ed8a6 /lib/Driver/ToolChains.cpp
parent6d9694cf46af57a28b371bd964b7f6bcafd7d961 (diff)
Now that multiple prefixes are much cheaper to search for GCC
installations, support them when installed directly under the system root ('/lib/gcc/...' essentially). With this, Clang can correctly detect and use a cross-compiling GCC installation within a system root and use it. Again, test cases will be coming in later commits, as I'm going to write a few test cases that exercise nearly all of this logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index ec11e73a18..14ac85ecb5 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1639,6 +1639,7 @@ public:
// Compute the set of prefixes for our search.
SmallVector<std::string, 8> Prefixes(D.PrefixDirs.begin(),
D.PrefixDirs.end());
+ Prefixes.push_back(D.SysRoot);
Prefixes.push_back(D.SysRoot + "/usr");
// Loop over the various components which exist and select the best GCC