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
This commit is contained in:
Chandler Carruth 2011-10-04 21:22:42 +00:00
parent 531f1ff78c
commit e683a18970
1 changed files with 1 additions and 0 deletions

View File

@ -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