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

Douglas Gregor dgregor at apple.com
Wed Nov 9 07:25:01 PST 2011


On Nov 9, 2011, at 2:21 AM, Don Quixote de la Mancha wrote:

>> 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.
> 
> I wasn't getting any diagnostics because I had created an empty Build
> Phase script.  I didn't see how to get rid of the script entirely, so
> I removed its contents.
> 
> I fixed this by opening my project bundle's project.pbxproj file and
> removing all the lines that mentioned CellRun.s.  In doing so I came
> across an empty build phase script, so I deleted that too.  After
> that, Xcode 4.2 attempted but failed to compile my assembly source.
> 
> The -x argument on clang's command line tells clang what language to
> treat the source file as.  Xcode 3.2.6 correctly uses "clang -x
> asm-with-cpp" to assemble the source file after passing it through the
> C preprocessor.  Xcode 4.2 tries to compile it as Objective-C by using
> "clang -x objective-c".
> 
> It looks like I have found a bug in Xcode, but I can't fathom how this
> could have slipped by Apple's own iOS developers, as they write more
> arm assembly code than any of us do!
> 
> I will try creating a minimal test case.  If that still tries to
> compile as Objective-C, I will file a bug report.

Thanks for digging into the cause here. For Xcode-related issues, please use Apple's developer forums and/or file a bug through bugreport.apple.com. We like to keep the open-source Clang mailing lists focused on the open-source Clang, and leave vendor-specific issues to vendor forums.

	- Doug




More information about the cfe-dev mailing list