Unable to conditionally compile ARM assember

Hi,

In gcc, I’d use the following code to conditionally compile a .s file (pure assembler) for ARM:

.set device, 0
.set device, arm

.if device

.endif

This is failing with clang 3.0 / Xcode 4.2 for simulator builds. You can typically do a clean, build and it works, but second time it fails.

Is there an alternative I am missing or another way to pass preprocessor directives to the assembler?

Cheers,

Stu

Stuart Carnie, CTO
manomio | in retro we trust!

Stuart Carnie, CTO
manomio | in retro we trust!

foo.s is pure assembler and not pre-processed. You want to use foo.S for
that. Alternatively, -x assembler-with-cpp should be usable.

Joerg

I found that Xcode 4.2 does pass .s through the preprocessor, so #ifdef arm works just fine too.

Stuart Carnie, CTO
manomio | in retro we trust!