[PATCH] D84206: [llvm-libtool-darwin] Add support for -filelist option

Sameer Arora via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 09:02:11 PDT 2020


sameerarora101 marked 8 inline comments as done.
sameerarora101 added inline comments.


================
Comment at: llvm/test/tools/llvm-libtool-darwin/filelist.test:28
+# RUN: rm -rf %t/dirname && mkdir -p %t/dirname
+# RUN: rm -f %t-input1.o && rm -f %basename_t.tmp-input1.o
+# RUN: yaml2obj %S/Inputs/input1.yaml -o %t/dirname/%basename_t.tmp-input1.o
----------------
jhenderson wrote:
> Why are you trying to delete some files here?
I just wanted to make sure that `%basename_t.tmp-input1.o` didn't exist in the current directory. However, I have now removed the error test just below  (and therefore removed `RUN: rm -f %t-input1.o && rm -f %basename_t.tmp-input1.o`) as it was similar to the "file not in filelist test" as you highlighted. Thanks!


================
Comment at: llvm/test/tools/llvm-libtool-darwin/filelist.test:66
+
+## Check that error is thrown when file in filelist doesn't exist (without dir):
+# RUN: echo 'no-such-file' > %t.invalid-list.txt
----------------
jhenderson wrote:
> This seems like essentially a duplicate of the earlier error case?
yup, you are right. I have now removed the previous test case


================
Comment at: llvm/test/tools/llvm-libtool-darwin/filelist.test:94
+# RUN: not llvm-libtool-darwin -static -o %t.lib -filelist %t.space-line.txt 2>&1 | \
+# RUN:   FileCheck %s --check-prefix=FILE-ERROR -DFILE=' '
----------------
jhenderson wrote:
> Additional possible test-cases:
> 1) Multiple file lists specified.
> 2) File is in working directory, but a directory name is specified.
> 3) Directory exists but does not contain the requested file.
3rd case is already there:
```
## Check that error is thrown when file in filelist doesn't exist (with dir):
# RUN: rm -rf %t/Invalid-Dir && mkdir -p %t/Invalid-Dir
# RUN: echo 'no-such-file' > %t.invalid-list.txt
# RUN: not llvm-libtool-darwin -static -o %t.lib -filelist %t.invalid-list.txt,%t/Invalid-Dir 2>&1 | \
# RUN:   FileCheck %s --check-prefix=FILE-ERROR -DFILE=%t/Invalid-Dir/no-such-file
```
 I have modified the comment to make it more clear. Added the first 2 cases now. Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84206/new/

https://reviews.llvm.org/D84206





More information about the llvm-commits mailing list