Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you set architecture specific Build Settings in an .xcconfig file in Xcode 4.3?

Tags:

xcode

xcconfig

I want to set Build Settings that are specific to each architecture (armv6 vs armv7). This is easy enough to do in the Xcode GUI, but I try to put all project configuration in .xcconfig files. Is it possible to replicate the following configuration (Thumb enabled for armv7, but not armv6 architectures) using .xcconfig files?

GCC_THUMB_SUPPORT Settings in Xcode

like image 888
Nick Forge Avatar asked Mar 16 '12 03:03

Nick Forge


People also ask

How do I change the build settings in Xcode?

Choose the project in the Project Navigator on the left. Select the Configurations target from the Targets section and click the Build Settings tab at the top. The Build Settings tab shows the build settings for the Configurations target. It's possible to expand this list with build settings that you define.

How do I create a .xcconfig file on a Mac?

To create the XCCONFIG file, open the project you want to create the XCCONFIG file for, select File → New → File..., choose "Other" (under iOS and OS X), select "Configuration Settings File," name the file, choose the save location, and click Create.

How do I add Xcconfig to my project?

To create an xcconfig file, choose File -> New -> File... in your project. In the new file dialog, scroll down until you see the Configuration Settings File in the Other section. You can add configurations for pretty much anything you want.


1 Answers

Yes, you can do that.

SETTING_NAME[arch=arch_name] = some_value

It's hard to find documentation on this. Apparently it was in the Xcode 3.0 release notes, but good luck finding those in Apple's current docs.

To solve your particular problem:

GCC_THUMB_SUPPORT[arch=armv6] = NO
GCC_THUMB_SUPPORT[arch=armv7] = YES
like image 78
Kurt Revis Avatar answered Nov 15 '22 07:11

Kurt Revis