Building with LLVM and any optimization causes app to crash on startup

前端 未结 2 1007
一个人的身影
一个人的身影 2020-12-05 16:03

When I try to build my app with LLVM 2.0 in XCode 4.0.1 and any level or optimization that is not none (anything but -O0), the app crashes after i launch it on the device (s

相关标签:
2条回答
  • 2020-12-05 16:56

    We've had the same issue with our app. It only affected armv6 code in Release/Distribution builds and thus only the iPhone 3G and the iPod Touch 2G. But contrary to your description, it was reproducible with XCode (we don't use xcodebuild).

    Obviously the generated code corrupts the stack pointer. As a consequence, you can't really debug it and the crash logs are worthless. With the debugger, it could stop at viewWillAppear:animated of the first view that should be displayed. But quickly after that, the app always crashed.

    Switching to an older compiler solved the problem.

    I've filed a bug with Apple. Please file one too as it is said to increase the priority of the bug.

    There are more people reporting the same problem:

    • Be cautious about using Xcode 4.0 with LLVM 2.0...
    • LLVM compiler 2.0 (Xcode 4) erzeugt... (in German)
    0 讨论(0)
  • 2020-12-05 16:58

    Upgrade to Xcode 4.0.2.

    It fixed this issue (crash on launch for ARMv6 but not ARMv7 with optimization turned on) for us.

    0 讨论(0)
提交回复
热议问题