<div dir="ltr">While I like the general idea of making the target libraries leaner, I really dislike more variable-based parameterization of our build.<div><br></div><div>We already have separate libraries for some of these components (the disassembler at least is cleanly factored out). Why not refactor the target initialization code, etc., so that tools which don't need the various bits of a particular target can easily just not link that sub-library?</div>
<div><br></div><div>FWIW, this is how our internal build system already works, and we get smaller binaries for tools like opt, llc, and clang as a consequence.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Apr 12, 2014 at 10:56 PM, Aditya Nandakumar <span dir="ltr"><<a href="mailto:aditya_nandakumar@apple.com" target="_blank">aditya_nandakumar@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
I have attached a patch which accepts CMAKE options to disable target specific components. Also attached is a patch for changes required for the R600 target. This can save megabytes in released binaries<br>
Eg usage :<br>
cmake -DLLVM_TARGETS_TO_BUILD="R600" -G "Ninja" -DCMAKE_BUILD_TYPE=Release ../llvm/ -DLLVM_TARGETS_DISABLE_INST_PRINTER=“R600”<br>
llvm-build and llvm-lit has been updated as well.<br>
<br>
Additional options to Cmake are<br>
-DLLVM_TARGETS_DISABLE_DISASSEMBLER=“…” and<br>
-DLLVM_TARGETS_DISABLE_PARSER=“…”<br>
<br>
I request you to kindly review this change.<br>
<br>
<br>
<br><br>
<br>
Thanks<br>
Aditya Nandakumar<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>