From: Sam Clegg Date: Fri, 28 Jun 2019 18:48:05 +0000 (+0000) Subject: [llvm-ar] Document response file support in --help X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddc7452fdd84ab0da6aff2ca1a960c94dece1cae;p=llvm [llvm-ar] Document response file support in --help Also a test for this. Differential Revision: https://reviews.llvm.org/D63836 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364673 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/tools/llvm-ar/response-file.test b/test/tools/llvm-ar/response-file.test new file mode 100644 index 00000000000..9e248d6b1c7 --- /dev/null +++ b/test/tools/llvm-ar/response-file.test @@ -0,0 +1,9 @@ +RUN: touch %t-a.txt %t-b.txt %t-c.txt +RUN: echo "rcs %t.a %t-a.txt %t-b.txt %t-c.txt" > %t-response +RUN: rm -f %t.a +RUN: llvm-ar @%t-response +RUN: llvm-ar t %t.a | FileCheck %s + +CHECK: a.txt +CHECK-NEXT: b.txt +CHECK-NEXT: c.txt diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index ea6d0410a63..91746d0fab3 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -78,6 +78,7 @@ OPTIONS: --plugin= - Ignored for compatibility --help - Display available options --version - Display the version of this program + @ - read options from OPERATIONS: d - delete [files] from the archive