<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jun 6, 2015 at 6:53 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 6 June 2015 at 19:07, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>> wrote:<br>
> On Sat, Jun 06, 2015 at 07:01:21PM -0400, Rafael Espíndola wrote:<br>
>> On 6 June 2015 at 18:57, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>> wrote:<br>
>> > On Sat, Jun 06, 2015 at 01:25:52PM -0400, Rafael Espíndola wrote:<br>
>> >> The lib format is really similar to the .a format.<br>
>> >><br>
>> >> I guess the only question I have about this direction is how would it<br>
>> >> compare with having lld fork+exec llvm-lib.exe and implementing<br>
>> >> llvm-lib.exe in the same binary as llvm-ar.exe (similar to how we do<br>
>> >> for llvm-ranlib.exe).<br>
>> ><br>
>> > Either way seems reasonable to me, but I see a few minor advantages of the<br>
>> > approach I took:<br>
>> ><br>
>> > 1) The lld tool is more self-contained, so it could be shipped on its own<br>
>> >    if a target build system does not need lib.exe.<br>
>> > 2) We save the cost of a fork+exec which could be expensive on Windows.<br>
>> > 3) Setting up the fork+exec is more code than a function call.<br>
>> ><br>
>> > One disadvantage is that there would be no way to swap out the llvm-lib.exe<br>
>> > tool with another tool that supports something that our tool currently<br>
>> > doesn't support (e.g. generating import libraries), but arguably the right<br>
>> > thing to do there would be to build that functionality into our own tool.<br>
>><br>
>> OK, I think I am sold on the library idea, but can llvm-lib.exe still<br>
>> be implemented as just another name of llvm-ar?<br>
><br>
> Sounds reasonable, I'll do that.<br>
<br>
</div></div>Cool, Rui, are you also OK with the general direction?<br></blockquote><div><br></div><div>Yes, I'm fine with this. Thank you for doing this, Peter. </div></div><br></div></div>