[cfe-dev] Compile ARM Assembler with Xcode 4.2 CLang?

Don Quixote de la Mancha quixote at dulcineatech.com
Wed Nov 9 01:10:20 PST 2011


I want to assemble arm assembly sources for the iOS with the build of
clang that comes with Apple's Xcode 4.2.  All the Googling I do
indicates that all I have to do is use the ".s" extension on my
assembly sources, but that's not working for me.  I think that must
have worked with previous GCC-based versions of Xcode, but it doesn't
seem to work with Xcode 4.2, which uses clang and LLVM.

I thought at first that clang only supported C, Objective-C, C++ and
Objective-C++, but "man clang" seems to indicate that it can serve as
a front-end to the assembler as well.

I'm getting some really screwy behavior when I try to assemble very
simple files.  My first try "CellRun.s" had nothing but the following
in it:

.align 2

This resulted in the error message "expected identififier or (".

Somehow I managed to delete CellRun.s.  When I created a new version,
I get no diagnostics at all.  Suspicious about this, I inserted
several lines of clearly illegal syntax.  These still did not generate
any diagnostics.  The build log in the Xcode IDE didn't have any lines
for CellRun.s, so this time I don't think Xcode is attempting to
compile it at all.

I think it might work to use a Custom Build Phase but I am unclear as
to how to do that.

Thanks!

Don Quixote
-- 
Don Quixote de la Mancha
Dulcinea Technologies Corporation
Software of Elegance and Beauty
http://www.dulcineatech.com
quixote at dulcineatech.com



More information about the cfe-dev mailing list