Xcode uses build settings to specify aspects of the build process followed to generate a product. As explained in Xcode Build System Guide, a build setting is a variable that determines how build tasks are performed.
You can customize most of the build settings listed in this document using the target and product editors in the Xcode application, configuration files, and xcodebuild
invocations. However, there are build settings that can be customized only through indirect means and build settings that are not customizable. Build settings that are not customizable do not have a “Default value” entry in their reference.
In addition, Xcode lets you assign conditional values to build settings. The conditions include build factors such as the architecture you’re targeting and the SDK you’re using. Build settings with conditional values are known as conditional build settings. For more information, see “Conditional Build Settings” in Xcode Build System Guide.
This document is intended for developers who need to get a deep understanding of how the Xcode build system works.
Prerequisites: To get the most out of this document, you should first read Xcode Project Management Guide and Xcode Build System Guide.
To fully understand how a target’s build settings affect a build and how they relate to one another, this document uses the following terms to describe each build setting and the build settings that relate to it.
Additional name used to identify a build setting.
String that represents a location inside a bundled product. See Bundle Programming Guide for information on product bundles.
C, C++, Objective-C, and Objective-C++.
C++, and Objective-C++.
Build settings that are used in conjunction with the referring build setting to accomplish its action. If you customize the referring build setting, you should review the specifications of its companion build settings.
The buildtime value of a build setting when there’s no corresponding setting specification for the target.
Build setting whose value is used to compute the default value of the referring build setting.
Build setting whose default value is computed using the value of the referring build setting.
String that represents a fully qualified filesystem path. When a path contains spaces, the path must be surrounded by single quotation marks ('
) or double quotation marks ("
), or the spaces must be escaped with a backslash (\
).
String that may contain numbers, letters, dashes (-
), periods (.
) or underscores (_
).
String that may contain digits, letters, dashes (-
), plus signs (+
), and underscores (_
).
A product configured for distribution to its users.
Directory that represents the root directory (/
) on a user’s computer.
String that may contain only digits.
String that may contain numbers and periods.
String that may contain the characters an identifier may contain as well as spaces. When an option specification contains spaces, it must be surrounded by single quotation marks ('
) or double quotation marks ("
).
Expression that must be true for the referring build setting to take effect.
The referring build setting’s value allows or suppresses the behavior specified by the referred build setting.
String that represents a location inside a project directory.
Build setting with a conceptual relationship with the referring build setting except for prerequisites, companions, effects, and effectors.
String that specifies a type. This string uses the reverse-DNS (Domain Name System) to uniquely identify an item in a way that other systems can recognize. See Uniform Type Identifiers Overview for details on uniform type identifiers.
Value of a build setting at build time. This is not necessarily the build setting specification. See Build Settings for details.
This document assumes that all the Xcode SDKs are installed on your computer.
If you develop products using C++, you may need to customize these build settings in your targets:
“GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS (Effective C++ Violation)”
“GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS (Hidden Virtual Functions)”
“GCC_WARN_NON_VIRTUAL_DESTRUCTOR (Nonvirtual Destructor)”
“STANDARD_C_PLUS_PLUS_LIBRARY_TYPE (C++ Standard Library Type)”
Use these build settings to customize your debugging experience:
“GCC_GENERATE_DEBUGGING_SYMBOLS (Generate Debug Symbols)”
“PRESERVE_DEAD_CODE_INITS_AND_TERMS (Don’t Dead-Strip Inits and Terms)”
The following sections describe build settings you can use to customize a build or to inquire about a the configuration of a build at build time.
Last updated: 2010-07-01