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

Yi Kong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 11:02:41 PDT 2019


kongyi added a comment.

In D69418#1721422 <https://reviews.llvm.org/D69418#1721422>, @rupprecht wrote:

> Can you say more about the use case? A possible counter argument for the presented use case would be that if you need to extract your archive to a different directory, you should have just fetched it to the right place to begin with.


The change is motivated by https://r.android.com/1146882. We need to run llvm-ar to extract and repack the same libgcc.a to multiple variants of it.

> 
> 
>> build process with both the llvm-ar tool path and the output file path are relative
> 
> Does the path to `llvm-ar` affect the extraction? I think paths are either interpreted relative to cwd or the archive itself, not the tool path (which is commonly `/usr/bin/llvm-ar`)

It does not affect the extraction, however without the option it creates a lot of hassle for projects which their build system supplies the path for a prebuilt `llvm-ar` relative to the project root directory.


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

https://reviews.llvm.org/D69418





More information about the llvm-commits mailing list