Lines 1253-1258
Generic_GCC::GCCInstallationDetector::init(
Link Here
|
1253 |
Prefixes.push_back("/usr"); |
1253 |
Prefixes.push_back("/usr"); |
1254 |
} |
1254 |
} |
1255 |
|
1255 |
|
|
|
1256 |
for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) { |
1257 |
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File = |
1258 |
llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str()); |
1259 |
if (File) |
1260 |
{ |
1261 |
bool Exists; |
1262 |
const std::string VersionText = File.get()->getBuffer().rsplit('-').second.substr(0,5).str(); |
1263 |
const std::string GentooPath = D.SysRoot + "/usr/lib/gcc/" + CandidateTripleAliases[k].str() + "/" + VersionText; |
1264 |
if (!llvm::sys::fs::exists(GentooPath + "/crtbegin.o", Exists) && Exists) |
1265 |
{ |
1266 |
Version = GCCVersion::Parse(VersionText); |
1267 |
GCCInstallPath = GentooPath; |
1268 |
GCCParentLibPath = GCCInstallPath + "/../../.."; |
1269 |
GCCTriple.setTriple(CandidateTripleAliases[k]); |
1270 |
IsValid = true; |
1271 |
return; |
1272 |
} |
1273 |
} |
1274 |
} |
1275 |
|
1256 |
// Loop over the various components which exist and select the best GCC |
1276 |
// Loop over the various components which exist and select the best GCC |
1257 |
// installation available. GCC installs are ranked by version number. |
1277 |
// installation available. GCC installs are ranked by version number. |
1258 |
Version = GCCVersion::Parse("0.0.0"); |
1278 |
Version = GCCVersion::Parse("0.0.0"); |
1259 |
- |
|
|