diff --git a/llvm/test/tools/llvm-libtool-darwin/ignored-options.test b/llvm/test/tools/llvm-libtool-darwin/ignored-options.test new file mode 100644 --- /dev/null +++ b/llvm/test/tools/llvm-libtool-darwin/ignored-options.test @@ -0,0 +1,8 @@ +## This tests some flags are correctly parsed even when they're not handled + +# RUN: llvm-libtool-darwin -V -syslibroot foo | FileCheck %s +# RUN: llvm-libtool-darwin -h | FileCheck --check-prefix=HELP %s + +# CHECK: Default target: + +# HELP-NOT: syslibroot diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp --- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp +++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp @@ -101,6 +101,8 @@ cl::cat(LibtoolCategory), cl::init(false)); +static cl::opt IgnoredSyslibRoot("syslibroot", cl::Hidden); + static const std::array StandardSearchDirs{ "/lib", "/usr/lib",