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

1

5

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

Tours answered 16/3, 2012 at 3:44 Comment(0)
S
8

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
Subdue answered 16/3, 2012 at 4:16 Comment(2)
Thanks, that worked. I edited your answer to add the actual setting that sets the configuration I was asking for.Tours
Note that you can find that answer yourself by selecting the row that you want the build setting for, and hitting ⌘-C to copy the setting. You can then paste it into your xcconfig file as text.Amos

© 2022 - 2024 — McMap. All rights reserved.