]> granicus.if.org Git - clang/commitdiff
Only print the selected multilib when something is actually found on the host.
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Wed, 19 Feb 2014 19:06:58 +0000 (19:06 +0000)
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Wed, 19 Feb 2014 19:06:58 +0000 (19:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201709 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Multilib.h
lib/Driver/ToolChains.cpp

index ad59d8a57fb5693c9cf9b1556cf91168e933d739..6c3738a9cc03764dbcf3a29c45504d13461257bb 100644 (file)
@@ -82,6 +82,10 @@ public:
   /// Check whether any of the 'against' flags contradict the 'for' flags.
   bool isValid() const;
 
+  /// Check whether the default is selected
+  bool isDefault() const
+  { return GCCSuffix.empty() && OSSuffix.empty() && IncludeSuffix.empty(); }
+
   bool operator==(const Multilib &Other) const;
 };
 
index 8d17ab10f2ee4914b16daaf1836fc37e257f36aa..bd557b749bc8264b1ec80fab924501ade0cda192 100644 (file)
@@ -1263,12 +1263,16 @@ void Generic_GCC::GCCInstallationDetector::print(raw_ostream &OS) const {
        I != E; ++I)
     OS << "Found candidate GCC installation: " << *I << "\n";
 
-  OS << "Selected GCC installation: " << GCCInstallPath << "\n";
+  if (!GCCInstallPath.empty())
+    OS << "Selected GCC installation: " << GCCInstallPath << "\n";
+
   for (MultilibSet::const_iterator I = Multilibs.begin(), E = Multilibs.end();
        I != E; ++I) {
     OS << "Candidate multiilb: " << *I << "\n";
   }
-  OS << "Selected multilib: " << SelectedMultilib << "\n";
+
+  if (Multilibs.size() != 0 || !SelectedMultilib.isDefault())
+    OS << "Selected multilib: " << SelectedMultilib << "\n";
 }
 
 bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {