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

Owen Anderson resistor at mac.com
Sat Apr 12 23:44:34 PDT 2014


Chandler,

On Apr 12, 2014, at 7:46 PM, Chandler Carruth <chandlerc at google.com> wrote:

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

That approach only makes sense in the context of linking LLVM statically.  We are trying to use LLVM as a dynamic library, and we’re very concerned about minimizing the distribution and storage footprint of that library.

I also disagree that requiring source changes in the client application to determine whether, say, the assembler printer for a given target is linked in or not is a good idea.  It’s very important for us to be able to have client applications log final assembly for during development and debugging, but we don’t want to pay the binary size overhead when we deploy.  Aditya’s patch addresses that need by saying that we’d build our release builds with different build settings than our debug builds, which is already the case in lots of other ways.  What you’re proposing requires the client applications (which are linking against a shared LLVM library) to know when the LLVM library was built for deployment or development.

—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140412/9137b4e1/attachment.html>


More information about the llvm-commits mailing list