Search code examples
iphoneobjective-ciosxcodeipad

How to add -mthumb to Xcode


Reading through the docs I saw this paragraph:

Build your program using the Thumb option. Adding the -mthumb compiler flag can reduce the size of your code by up to 35%. However, if your app contains floating-point–intensive code modules and you are building your app for ARMv6, you should disable the Thumb option. If you are building your code for ARMv7, you should leave Thumb enabled.

Where do I put the flag -mthumb on Xcode? I'am using Xcode 4.4.1.


Solution

  • Looking at the assembler output, I believe Thumb generation is the default in clang when building for armv7. You can turn it off using -mno-thumb.