[PATCH] D57927: [llvm-ar] Implement the P modifier.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 7 14:20:51 PST 2019


rupprecht created this revision.
rupprecht added reviewers: mstorsjo, pcc, ruiu, davide, david2050, rnk.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

GNU ar has a `P` modifier that changes filename comparisons to use full paths instead of the basename. As noted in the GNU docs, regular archives are not created with full path names, so P is used to deal with archives created by other archive programs (e.g. see the updated `absolute-paths.test` test case).

Since thin archives use full path names -- paths are relative to the archive -- it seems very error prone to not imply P when dealing with thin archives, so P is implied in those cases. (I think this is a deviation from GNU ar that makes sense).

This fixes PR37436 via https://github.com/ClangBuiltLinux/linux/issues/33.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D57927

Files:
  llvm/test/tools/llvm-ar/absolute-paths.test
  llvm/test/tools/llvm-ar/full-path-option.test
  llvm/tools/llvm-ar/llvm-ar.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57927.185867.patch
Type: text/x-patch
Size: 10032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190207/75163a0e/attachment.bin>


More information about the llvm-commits mailing list