[LLVMdev] how to compile asm output for x86 with Micorsoft's ML

Chris Lattner clattner at apple.com
Thu Jan 21 13:31:05 PST 2010


On Jan 21, 2010, at 12:54 PM, Jim Crafton wrote:

>> By default, the cmake build generates Visual Studio project files for
>> the X86 target only. Take a look at
>>
>> http://www.llvm.org/docs/CMake.html#llvmvars
>>
>> for learning how to build other targets.
>
> OK thanks, I'll look at that.
>
> In the meantime, is it possible to get the assembly generated by llc
> to work wiht ML? That would probably be the ideal solution.

Nope, llvm's .s output is only compatible with GAS and other at&t  
syntax assemblers.  It turns out that MASM syntax is highly ambiguous  
and MASM is not production quality for use by a compiler.  This is why  
visual studio doesn't go through it.  Long term, we'd like LLVM to be  
able to write out .o files directly, if you're interested in adding  
PECOFF support, that would be very nice :)

-Chris



More information about the llvm-dev mailing list