Xcode 4.2 LLVM-built armv6 floating point crashes fixed!
It’s been a week since Dex 1.3.7 got approved and best I can tell it fixed the problems that were introduced with version 1.3.6, which was the first release to be built using the new LLVM complier, Xcode 4.2 and the iOS 5 SDK.
Dex’s iOS project template like many others used $(ARCHS_STANDARD_32_BIT) to define the architectures to build. Previous to Xcode 4.2 this expanded to armv6 and armv7. With Xcode 4.2 however this resolves to armv7 only. Not interested in dropping support for the original iPhone or iPhone 3G in a bug fix release I re-added armv6 as a architecture manually.
For the most part it worked fine but after getting approved by Apple I had multiple users report of crashes a few seconds after launch. Unable to get crash logs due to problems with Hoptoad/Airbreak I was left a little stumped. In time I found a few threads on the Apple Developer Forums which helped.
It seems there is a problem where the LLVM complier’s optimizations for floating point math is broken for armv6 and stuff the interacts with things like CGPoint and CGSize structs break. To turn off these optimizations add a compiler flag of -mno-thumb. Doing this (and adding HockeyApp’s crash logging) I’m pretty satisfied that the problem has now been fixed.
Posted on: November 7, 2011 – 12:10 PM

One Comment
Here is a quick demo of how to edit these settings:
http://media.clickablebliss.com/blog/movies/editing_archs_and_complier_flags.mov
Post a Comment | Comment RSS feed