[PATCH] D33575: [llvm-ar] Make llvm-lib behave more like the MSVC archiver

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 10:38:23 PDT 2017


On Fri, May 26, 2017 at 10:32 AM Reid Kleckner <rnk at google.com> wrote:

> On Thu, May 25, 2017 at 5:20 PM, Zachary Turner <zturner at google.com>
> wrote:
>
>> I guess it's possible I'm just missing something, but what I don't
>> understand is why `Thin` can't just be the only determining factor of
>> whether we write full paths.  Why the second variable?  AFAICT nowhere in
>> this patch is `false` ever explicitly passed, it only takes on a `false`
>> value implicitly when `Thin` is also false.  So just delete the variable,
>> and only use the value of `Thin`?
>>
>
> Microsoft tools won't understand thin archives. Thin archives leave the
> object files on disk instead of copying them into the archive. The whole
> point of this patch is to make llvm-lib.exe behave more like lib.exe, so it
> would defeat the purpose if we went our own way here.
>

Would it make sense then to change from using two booleans, one combination
of which is invalid, to an enumeration with 3 states?

```
enum ArchiveStyle {
  AS_Thin,
  AS_Fat,
  AS_FatWithFullPaths
};
```

or something like that?  It's not obvious to an outsider what the various
options are just by reading the function signature, perhaps this could make
it easier to understand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170526/ea4b1c46/attachment.html>


More information about the llvm-commits mailing list