diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2011-10-04 21:22:42 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2011-10-04 21:22:42 +0000 |
| commit | e683a189705065a94b83460d7b0c596d6084b58c (patch) | |
| tree | 3b7eacedded9f2621760a4d3684e0b565ce98555 /clang/lib/Driver | |
| parent | 531f1ff78cd5547677ebe38bfe448fce9df6859a (diff) | |
| download | bcm5719-llvm-e683a189705065a94b83460d7b0c596d6084b58c.tar.gz bcm5719-llvm-e683a189705065a94b83460d7b0c596d6084b58c.zip | |
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.
llvm-svn: 141121
Diffstat (limited to 'clang/lib/Driver')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index ec11e73a185..14ac85ecb51 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/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 |

