From: Yunzhong Gao Date: Wed, 19 Feb 2014 19:06:58 +0000 (+0000) Subject: Only print the selected multilib when something is actually found on the host. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1f36013256bd914bace98d1785024f02d88202a;p=clang Only print the selected multilib when something is actually found on the host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201709 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Multilib.h b/include/clang/Driver/Multilib.h index ad59d8a57f..6c3738a9cc 100644 --- a/include/clang/Driver/Multilib.h +++ b/include/clang/Driver/Multilib.h @@ -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; }; diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 8d17ab10f2..bd557b749b 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -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 {