<p dir="ltr">FYI, I override CMAKE_CXX_CREATE_STATIC_LIBRARY.</p>
<p dir="ltr">See,<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__bb.pgr.jp_builders_clang-2D3stage-2Dx86-5F64-2Dlinux_builds_8687_steps_CMake_logs_stdio&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=oHj61SUaUWptc1PFrflYA4rr0984U0KYTFiBSPEZpws&s=74W_4zeUNG0tmpCmicrIt2jdHk-exmOxEhvpaGgw42A&e=">http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/8687/steps/CMake/logs/stdio</a></p>
<br><div class="gmail_quote"><div dir="ltr">2015年7月16日(木) 12:37 Pete Cooper <<a href="mailto:peter_cooper@apple.com">peter_cooper@apple.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Jul 15, 2015, at 6:00 PM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>> wrote:</div><br><div>I have just committed support to llvm-ar for creating thin archives.<br>The idea of thin archives is that they contain just the symbol table<br>and the path to find the original .o files.<br><br>By locally making thin archives the default I was able to build<br>llvm+lld+clang with them. The total size of the .a files goes from<br>181,658,164 to 7,116,900 bytes.<br></div></blockquote></div></div><div style="word-wrap:break-word"><div>Nice!<br><blockquote type="cite"><div></div></blockquote></div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div><br>Is there any way to do that with cmake without having to have a hacked<br>llvm-ar? All that is needed is for cmake to run<br><br>.../llvm-ar cqT foo.a ....<br><br>instead of<br><br></div></blockquote></div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div>.../llvm-ar cq foo.a ….<br></div></blockquote>I found an answer, but its not much better than having a hacked up version of llvm-ar:</div><div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_questions_5659225_how-2Dto-2Dset-2Dthe-2Doptions-2Dfor-2Dcmake-2Dar&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=Jpp1nE_QdPfy53TuYzax1tQ9vm54WtEfIxOzgPgQd20&s=tsgr0UMk83KCBHpabWCkl7li3BJKlRMW1wjGKpCoN7k&e=" target="_blank">http://stackoverflow.com/questions/5659225/how-to-set-the-options-for-cmake-ar</a></div><div><br></div><div>Cheers,</div><div>Pete<br><blockquote type="cite"><div><br>Thanks,<br>Rafael<br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div>