[clang] [Driver] Simply some gcc search logic (PR #72558)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 18 00:35:05 PST 2023
================
@@ -2117,14 +2117,17 @@ void Generic_GCC::GCCInstallationDetector::init(
// The compatible GCC triples for this particular architecture.
SmallVector<StringRef, 16> CandidateTripleAliases;
SmallVector<StringRef, 16> CandidateBiarchTripleAliases;
+ // Add some triples that we want to check first.
+ CandidateTripleAliases.push_back(TargetTriple.str());
+ std::string TripleNoVendor = TargetTriple.getArchName().str() + "-" +
+ TargetTriple.getOSAndEnvironmentName().str();
+ if (TargetTriple.getVendor() == llvm::Triple::UnknownVendor) {
+ CandidateTripleAliases.push_back(TripleNoVendor);
+ }
----------------
MaskRay wrote:
drop braces
https://github.com/llvm/llvm-project/pull/72558
More information about the cfe-commits
mailing list