[LLVMdev] Static code generation - is it gone from LLVM 2.7?

Chris Lattner clattner at apple.com
Sat Mar 27 10:35:22 PDT 2010


On Mar 27, 2010, at 3:41 AM, Peter Shugalev wrote:

>>> Now LLVMTargetMachine::addPassesToEmitFile has changed. It adds its own
>>> code emitter and it's always MachOCodeEmitter which of course I don't need.
>>> 
>>> Is there a new way to create non-JIT object code in LLVM 2.7?
>> 
>> Nope, sorry.  This will hopefully be coming in 2.8.  Mainline llvm can already do macho quite robustly for x86-32 and x86-64.
>> 
>> -Chris
>> 
> 
> What exactly is expected to be coming? Will it be the same way MachO is
> currently implemented but with some flexibility to supply my own class
> to do actual object output? Or just a return of old ObjectCodeEmitter?

We're integrating a full assembler into the compiler.  I'm not sure what you mean by "flexibility to supply my own class to do actual object output", but you should be able to implement your own container format, right now even. :)

-Chris



More information about the llvm-dev mailing list