[LLVMdev] Using thin archives when building llvm

Pete Cooper peter_cooper at apple.com
Wed Jul 15 20:32:17 PDT 2015


> On Jul 15, 2015, at 6:00 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
> I have just committed support to llvm-ar for creating thin archives.
> The idea of thin archives is that they contain just the symbol table
> and the path to find the original .o files.
> 
> By locally making thin archives the default I was able to build
> llvm+lld+clang with them. The total size of the .a files goes from
> 181,658,164 to 7,116,900 bytes.
Nice!
> 
> Is there any way to do that with cmake without having to have a hacked
> llvm-ar? All that is needed is for cmake to run
> 
> .../llvm-ar cqT foo.a ....
> 
> instead of
> 
> .../llvm-ar cq foo.a ….
I found an answer, but its not much better than having a hacked up version of llvm-ar:
http://stackoverflow.com/questions/5659225/how-to-set-the-options-for-cmake-ar <http://stackoverflow.com/questions/5659225/how-to-set-the-options-for-cmake-ar>

Cheers,
Pete
> 
> Thanks,
> Rafael
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150715/f12f5526/attachment.html>


More information about the llvm-dev mailing list