MS assembler support

Hello, Benedict

As far as I can tell it seems that the LLVM x86 backend targets GNU
assembler with DWARF for debug and there is not a way, currently, to
output for MS assembler with COFF debug info. Is this correct or am I
just looking at the wrong part?

Multiple issues here, actually.

First of all, there is "X86IntelAsmPrinter", which outputs MASM-compatible assembler. You
can select assembler flavour via command line, for example. However, MASM is really weak to
support all necessary features for compilation of something huge and complex (MS tools do
not emit assembler directly, their assembler listings are pure listings, they cannot be used
for recompilaiton. This is especially true if you generate them from some C++ code), so only
small and easy things will work.

This is not limitation of LLVM itself, but limitation of vendor-provided tools.

As for COFF debugging format- are you referring to 'plain' COFF debugging format or to
proprietary CV format used by Microsoft?

Hi Anton,

Ok maybe I should have stated what it was that I wanted to do. In this
context I would like to compile C code, with LLVM, to MS proprietary CV
format that can be linked and debugged with Visual Studio, but from what
you are saying this is not currently possible.

Thanks,

Ben

If the assembler is a limitation, the best solution would be to add a direct PECOFF writer. There is a start of direct ELF and Macho writers already in the tree. They are not production quality, but could be a useful place to start looking.

-Chris