[LLVMdev] Using thin archives when building llvm

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Jul 15 18:00:52 PDT 2015


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.

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 ....

Thanks,
Rafael



More information about the llvm-dev mailing list