[LLVMdev] static compilation with the LLVM C frontend

Andrew Lenharth alenhar2 at uiuc.edu
Mon Jul 17 09:38:57 PDT 2006


On Fri, 2006-07-14 at 15:15 +0200, Kenneth Hoste wrote:
> Hello all,
> 
> I'm wondering if static compilation using llvm-gcc, i.e. including the 
> library code (for example prinft) in the LLVM bytecode, is possible?

Static won't help you any.  Unless the library is in bytecode form and
you are linking it in that form before analsis/instrumentation, it will
not be counted.

> I hope this is possible using LLVM, because otherwise it would mean LLVM 
> is not really usefull for me. Any solutions, even compiling glibc 
> myself, are an option.

You need to compile glibc or at least as much of it as you care about
and link it in as bytecode to your application.

Andrew




More information about the llvm-dev mailing list