[llvm-ar] Document response file support in --help
authorSam Clegg <sbc@chromium.org>
Fri, 28 Jun 2019 18:48:05 +0000 (18:48 +0000)
committerSam Clegg <sbc@chromium.org>
Fri, 28 Jun 2019 18:48:05 +0000 (18:48 +0000)
Also a test for this.

Differential Revision: https://reviews.llvm.org/D63836

llvm-svn: 364673

llvm/test/tools/llvm-ar/response-file.test [new file with mode: 0644]
llvm/tools/llvm-ar/llvm-ar.cpp

diff --git a/llvm/test/tools/llvm-ar/response-file.test b/llvm/test/tools/llvm-ar/response-file.test
new file mode 100644 (file)
index 0000000..9e248d6
--- /dev/null
@@ -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
index ea6d041..91746d0 100644 (file)
@@ -78,6 +78,7 @@ OPTIONS:
   --plugin=<string>     - Ignored for compatibility
   --help                - Display available options
   --version             - Display the version of this program
+  @<file>               - read options from <file>
 
 OPERATIONS:
   d - delete [files] from the archive