[LLVMdev] [RFC] New ToolsSupport library for stuff that only tools need

Jim Grosbach grosbach at apple.com
Fri Nov 7 12:28:03 PST 2014


> On Nov 7, 2014, at 11:05 AM, Chandler Carruth <chandlerc at google.com> wrote:
> 
> 
> On Fri, Nov 7, 2014 at 12:20 PM, Owen Anderson <resistor at mac.com <mailto:resistor at mac.com>> wrote:
>> On Nov 7, 2014, at 8:57 AM, Daniel Dunbar <daniel at zuster.org <mailto:daniel at zuster.org>> wrote:
>> 
>> 2. I agree with Chandler in that I don't see a good need to try hard to factor out code from the Support library that can just be conditional disabled or would be unused by normal .a link semantics. For example, whether or not the regex or YAML code belongs in Support doesn't seem worth worrying too much about, because they are very isolated, don't introduce extra dependencies, and won't be linked by projects that don't use them.
> 
> This assumes that the client is statically linking against Support.  Chris has been pretty explicit about his goals of building and using LLVM as a monolithic dynamic library, in which case things like regex or YAML support will *not* be automatically removed.
> 
> I see...
> 
> Maybe what we really need is (lacking a complete export list for the monolithic dynamic library) to use visibility so that these kinds of things can be dropped from the final dynamic library if they aren't used within it? I suspect would could mark essentially all of the support library, as unless it is used in the interface of some other library, we probably don't want to export it... (Having just started thinking about this, I've no idea whether folks using the LLVM dynamic library are independently using bits of the ADT for example….)

To the best of my understanding, many linkers don’t have sufficiently granular dead code stripping to rely on it for this. 

> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141107/32ecb40a/attachment.html>


More information about the llvm-dev mailing list