aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp')
-rw-r--r--llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
index 1ff6328e..0217364 100644
--- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
+++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
@@ -89,6 +89,11 @@ static cl::opt<bool>
VersionOption("V", cl::desc("Print the version number and exit"),
cl::cat(LibtoolCategory));
+static cl::opt<bool> NoWarningForNoSymbols(
+ "no_warning_for_no_symbols",
+ cl::desc("Do not warn about files that have no symbols"),
+ cl::cat(LibtoolCategory), cl::init(false));
+
static const std::array<std::string, 3> StandardSearchDirs{
"/lib",
"/usr/lib",
@@ -251,6 +256,9 @@ static Error verifyAndAddMachOObject(MembersPerArchitectureMap &Members,
return Error::success();
}
+ if (!NoWarningForNoSymbols && O->symbols().empty())
+ WithColor::warning() << Member.MemberName + " has no symbols\n";
+
uint64_t FileCPUID = getCPUID(FileCPUType, FileCPUSubtype);
Members[FileCPUID].push_back(std::move(Member));
return Error::success();