I'm under Ubuntu 12.04 x86 64 bit, I have compiled a 32 bit version of llvm/clang
from the official svn repository successfully.
I'm now trying to compile c++ code for ARM, at this point i don't care about platform versions like armv5
vs armv7a
, I'm focusing on how the platform switch works for clang
:
llvm-config --targets-built
ARM CellSPU CppBackend Hexagon Mips MBlaze MSP430 NVPTX PowerPC Sparc X86 XCore
but the following command doesn't work
clang++ -arch arm soft.cpp -o soft_ARM
the output is
clang-3: warning: argument unused during compilation: '-arch arm'
I have also tried gcc-like variants or other combinations like -arch=arm
, -arch=armv7a
, -march=armv5
but nothing seems to work.
After reading some docs i noticed that clang works for ARM only under MAC OS X / Darwin and it's not supposed to work for ARM under other OS.
How i can compile for ARM with clang and what the output of llvm-config --targets-built
is really about ?