aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
diff options
context:
space:
mode:
authorKeith Smiley <keithbsmiley@gmail.com>2022-09-20 13:35:17 -0700
committerKeith Smiley <keithbsmiley@gmail.com>2022-10-03 09:53:01 -0700
commite8c10fc1811f2cf7e9a2b4921d9a065ee6384588 (patch)
tree83df9b96f17c43daa3fc729d0fb2afcd579b3a9e /llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
parent21f97fdc9788fdc294659055f16290688c11e540 (diff)
downloadllvm-e8c10fc1811f2cf7e9a2b4921d9a065ee6384588.zip
llvm-e8c10fc1811f2cf7e9a2b4921d9a065ee6384588.tar.gz
llvm-e8c10fc1811f2cf7e9a2b4921d9a065ee6384588.tar.bz2
[llvm-libtool-darwin] Parse and ignore -syslibroot
cctools libtool allows you to link dynamic libraries by passing through a number of arguments to ld64. Because of this the default arguments libtool receives in Xcode contains arguments that only matter in that case. This change ignores this argument, at least until we ever support that dynamic use case, so that you can use llvm-libtool-darwin as a drop-in replacement in Xcode for cctools libtool. There are more arguments we could ignore for this case, but we can probably add those as the use case comes up. Differential Revision: https://reviews.llvm.org/D134309
Diffstat (limited to 'llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp')
-rw-r--r--llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp2
1 files changed, 2 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 08b371e..8d4529c 100644
--- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
+++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
@@ -101,6 +101,8 @@ static cl::opt<bool> WarningsAsErrors("warnings_as_errors",
cl::cat(LibtoolCategory),
cl::init(false));
+static cl::opt<std::string> IgnoredSyslibRoot("syslibroot", cl::Hidden);
+
static const std::array<std::string, 3> StandardSearchDirs{
"/lib",
"/usr/lib",