On 12 May 2014 15:11, Tim Northover <t.p.northover at gmail.com> wrote:> It sounds like you're using the wrong triple. Even on Windows you > should be able to output ELF if you compile with (say) "clang -target > arm-none-eabi".Or not using a triple at all. Windows on ARM support is coming along, I bet it defaults to WoA and outputs COFF or whatever. cheers, --renato
Hi, all Could you give an ARM example project that can be compiled to ELF file by LLVM ? My command lines is as follows. clang -c d:\aa.c -emit-llvm -o aa.bc llc aa.bc -march=arm -filetype=obj -o aa.elf the follow assert will be thrown "ARM does not support Windows COFF format Unreachable executed .....\ARMMCTargetDesc.cpp 250!" I am looking forward to your help. Thanks! Steven At 2014-05-12 23:26:56,"Renato Golin" <renato.golin at linaro.org> wrote:>On 12 May 2014 15:11, Tim Northover <t.p.northover at gmail.com> wrote: >> It sounds like you're using the wrong triple. Even on Windows you >> should be able to output ELF if you compile with (say) "clang -target >> arm-none-eabi". > >Or not using a triple at all. Windows on ARM support is coming along, >I bet it defaults to WoA and outputs COFF or whatever. > >cheers, >--renato-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140513/cd064a46/attachment.html>
On 13 May 2014 13:22, qw <qiuwei-qiuwei at 163.com> wrote:> clang -c d:\aa.c -emit-llvm -o aa.bc > llc aa.bc -march=arm -filetype=obj -o aa.elfHi Steven, As Tim said, try: $ clang -target armv6m-none-eabi -c d:\aa.c -emit-llvm -o aa.bc Otherwise, Clang will generate binaries to the target platform, you your case, probably an x86_64 Windows. On its own, llc cannot transform an IR that was emitted to x86_64 to an ARM IR, which are reasonably different. Once you have an ARMv6 IR, llc will create an ELF object even without -march of -filetype parameters. cheers, --renato