[PATCH] D69418: [llvm-ar] Add output option for extract operation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 10:20:02 PST 2019


MaskRay added a comment.

I think we now need to do:

- Change the command line parser. `llvm-ar x --output=/tmp a.a` and `llvm-ar --output=dir x a.a` (options around the operation) should work, but `llvm-ar x a.a --output=dir` (options after the archive) should fail.
- When `--output=/tmp/c` is specified, let `llvm-ar xv a.a` print `x - /tmp/c/a.o` (this is now the GNU ar behavior), instead of `x - a.o`. In the test, we may need to use `--output=%t` in the RUN line and `x - [[DIR]]/a.o` in the CHECK line (`FileCheck %s -DDIR=%t`).
- I think members with `..` or absolute paths are already excluded, but I may be wrong. Rejecting `..` and absolute paths, and giving a friendly error in a separate patch should be fine.


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

https://reviews.llvm.org/D69418





More information about the llvm-commits mailing list