[cfe-dev] Targeting ARM with Clang

Chris Lattner clattner at apple.com
Sun Jul 18 10:49:17 PDT 2010


On Jul 18, 2010, at 4:34 AM, Zhongxing Xu wrote:

> On Sat, Jul 17, 2010 at 4:47 AM, Anton Korobeynikov
> <anton at korobeynikov.info> wrote:
>>> ./Debug+Asserts/bin/clang -arch armv7 -S -O3 -o - hello.c
>> -arch is darwin-only thing though...
> 
> Why -arch is darwin-only?

Because clang needs to know what assembler, linker, libraries etc to use for arm.  Darwin supports -arch throughout the entire toolchain, so clang can just run "as -arch armv7".  Linux and other targets don't have anything like this, and noone has enhanced clang to support the linux model.

-Chris





More information about the cfe-dev mailing list