[PATCH] Review: Add Cmake Options to disable target components (AsmParser, InstPrinter, Disassembler)

Chandler Carruth chandlerc at google.com
Sat Apr 12 19:46:04 PDT 2014


While I like the general idea of making the target libraries leaner, I
really dislike more variable-based parameterization of our build.

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?

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.


On Sat, Apr 12, 2014 at 10:56 PM, Aditya Nandakumar <
aditya_nandakumar at apple.com> wrote:

> Hi
>
> 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
> Eg usage :
> cmake -DLLVM_TARGETS_TO_BUILD="R600" -G "Ninja" -DCMAKE_BUILD_TYPE=Release
> ../llvm/ -DLLVM_TARGETS_DISABLE_INST_PRINTER=“R600”
> llvm-build and llvm-lit has been updated as well.
>
> Additional options to Cmake are
> -DLLVM_TARGETS_DISABLE_DISASSEMBLER=“…” and
> -DLLVM_TARGETS_DISABLE_PARSER=“…”
>
> I request you to kindly review this change.
>
>
>
>
>
> Thanks
> Aditya Nandakumar
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140413/6e15d4b3/attachment.html>


More information about the llvm-commits mailing list