[LLVMdev] Whole program compile/link

Richard Pennington rich at pennware.com
Sun Jul 26 10:04:29 PDT 2009

Mike Stump wrote:
> On Jul 26, 2009, at 5:25 AM, Richard Pennington wrote:
>> I suppose that an option would be to put the support stuff in a file
>> that is linked in always and let the optimizer drop functions that
>> aren't referenced. :-(
> I like the idea of modeling this as a .a file, and then letting the  
> linker figure out that there are references to the routines and have  
> it pull them in.  If your linker doesn't support this directly, you  
> can just bundle them all up and include in the `program'.

I like that idea, too. But unfortunately at (bc) link time, the linker 
doesn't know the functions are required.

Maybe a hook to pull the bitcode for support functions out of a library 
as needed during code generation?


More information about the llvm-dev mailing list