0

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
alexandresoli
  • 918
  • 1
  • 9
  • 18
  • 1
    Possible duplicate of http://stackoverflow.com/questions/8390606/is-there-a-way-to-compile-for-arm-rather-than-thumb-in-xcode-4 – Apurv Aug 24 '12 at 04:31

1 Answers1

3

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.

Rob Napier
  • 286,113
  • 34
  • 456
  • 610
  • I could not find this option, can you be more specific? – alexandresoli Aug 24 '12 at 04:40
  • 3
    You can pass arbitrary compiler flags in "Other C Flags." You can set individual file options in the Build Phases>Compile Sources section. Turning off thumb generation is pretty rare, though I have had to do it before in C++ code that broke the compiler. – Rob Napier Aug 24 '12 at 04:57