diff --git a/llvm/test/tools/llvm-ar/response-file.test b/llvm/test/tools/llvm-ar/response-file.test new file mode 100644 --- /dev/null +++ b/llvm/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/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp --- a/llvm/tools/llvm-ar/llvm-ar.cpp +++ b/llvm/tools/llvm-ar/llvm-ar.cpp @@ -78,6 +78,7 @@ --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