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

Owen Anderson resistor at mac.com
Wed Apr 16 21:37:21 PDT 2014


Hi Chandler,

On Apr 16, 2014, at 12:46 AM, Chandler Carruth <chandlerc at google.com> wrote:
>  
> 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.
> 
> Not really. LLVM can always provide stubs that handle the difference between deployment vs. development here.
> 
> You still need some way to control whether the assembly is dumped, etc. I would suggest using one of the *existing* build parameters for that such is NDEBUG, or even commandline flags, which just produce an error if the assembly printing library isn't available in whatever mode it is being built.
> 
> The really important thing for me is that we don't end up with yet more permutations of ways to build the actual targets themselves. Instead, I feel like clients of the *target* (which might be some umbrella LLVM library, or the opt tool, or whatever else you have) can be clients of just the core sub-libraries of the target or also of the asm printing in the target. If they use the asm printing, then they have to get linked against the asm printing sub-library. But the target is always built into these smaller sub-libraries and doesn't need to be aware of this parameterization. Is this making sense? Perhaps we are talking past each other if not...

Can you elaborate on this solution would work?  It’s not clear to me how we would make the dependencies optional without configuring things out at build time.

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


More information about the llvm-commits mailing list