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

Peter Shugalev peter at shugalev.com
Sat Mar 27 14:28:05 PDT 2010


Chris Lattner wrote:
> On Mar 27, 2010, at 12:49 PM, Peter Shugalev wrote:
> 
>>>> New method of emitting object code is ok for me. But it is still
>>>> experimental, isn't it?
>>> Yes.
>> Thank you for answers!
>>
>> Now there is a way to implement what I'd like to. But it would be MUCH
>> better if LLVMTargetMachine::addPassesToEmitFile could take arbitrary
>> MCStreamer as input. Without such a feature when compiling bytecode
>> (i.e. emulating llc -filetype=obj behaviour) I have to emit .s file
>> first, disassemble it and feed to custom MCStreamer. That'll hopely work
>> but it's ugly.
> 
> What are you trying to do?  I don't see why you'd have to do that.
> 
> -Chris
> 

Long story short
I'd like to do something like this
> llc -filetype=obj foo.bc

But due to API changes I've got to do
> llc -filetype=asm foo.bc | llvm-mc assemble -filetype=obj

Which will work but the former is clearly better

-- 
Best Regards
Peter Shugalev



More information about the llvm-dev mailing list