Xcode Build Setting Reference
Total Page:16
File Type:pdf, Size:1020Kb
Xcode Build Setting Reference 2006-10-03 Simultaneously published in the United Apple Computer, Inc. States and Canada. © 2006 Apple Computer, Inc. Even though Apple has reviewed this document, All rights reserved. APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS No part of this publication may be DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A reproduced, stored in a retrieval system, or PARTICULAR PURPOSE. AS A RESULT, THIS transmitted, in any form or by any means, DOCUMENT IS PROVIDED “AS IS,” AND mechanical, electronic, photocopying, YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND recording, or otherwise, without prior ACCURACY. written permission of Apple Computer, Inc., IN NO EVENT WILL APPLE BE LIABLE FOR with the following exceptions: Any person DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES is hereby authorized to store documentation RESULTING FROM ANY DEFECT OR on a single computer for personal use only INACCURACY IN THIS DOCUMENT, even if and to print copies of documentation for advised of the possibility of such damages. personal use provided that the THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN documentation contains Apple’s copyright LIEU OF ALL OTHERS, ORAL OR WRITTEN, notice. EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any The Apple logo is a trademark of Apple modification, extension, or addition to this Computer, Inc. warranty. Some states do not allow the exclusion or Use of the “keyboard” Apple logo limitation of implied warranties or liability for (Option-Shift-K) for commercial purposes incidental or consequential damages, so the above limitation or exclusion may not apply to without the prior written consent of Apple you. This warranty gives you specific legal may constitute trademark infringement and rights, and you may also have other rights which vary from state to state. unfair competition in violation of federal and state laws. No licenses, express or implied, are granted with respect to any of the technology described in this document. Apple retains all intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-labeled or Apple-licensed computers. Every effort has been made to ensure that the information in this document is accurate. Apple is not responsible for typographical errors. Apple Computer, Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 Apple, the Apple logo, Mac, Mac OS, and Xcode are trademarks of Apple Computer, Inc., registered in the United States and other countries. Objective-C is a registered trademark of NeXT Software, Inc. PowerPC and and the PowerPC logo are trademarks of International Business Machines Corporation, used under license therefrom. Contents Chapter 1 Introduction to Xcode Build Setting Reference 7 Chapter 2 Build Setting Reference 11 Product Information Build Settings 11 ARCHS (Architectures) 11 DYLIB_COMPATIBILITY_VERSION (Compatibility Version) 11 DYLIB_CURRENT_VERSION (Current Library Version) 12 GENERATE_PKGINFO_FILE (Force Package Info Generation) 12 INFOPLIST_FILE 12 MACH_O_TYPE 12 PRODUCT_NAME 13 PROJECT_NAME 13 TARGET_NAME 13 VALID_ARCHS 14 Build Properties Build Settings 14 ACTION 14 BUILD_COMPONENTS 15 BUILD_VARIANTS (Build Variants) 15 CONFIGURATION 16 CURRENT_ARCH 16 CURRENT_VARIANT 16 DEBUG_INFORMATION_FORMAT (Debug Information Format) 17 DEPLOYMENT_POSTPROCESSING (Deployment Postprocessing) 17 ENABLE_HEADER_DEPENDENCIES 17 NATIVE_ARCH 18 PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES 18 RETAIN_RAW_BINARIES 18 Build and Product Location Build Settings 19 BUILT_PRODUCTS_DIR 19 CACHE_ROOT 19 CONFIGURATION_BUILD_DIR (Per-Configuration Build Products Path) 19 CONFIGURATION_TEMP_DIR (Per-Configuration Intermediate File Path) 20 DEPLOYMENT_LOCATION (Deployment Location) 20 DERIVED_FILE_DIR 21 DSTROOT (Installation Build Products Location) 21 INSTALL_DIR 21 INSTALL_PATH (Installation Directory) 21 3 2006-10-03 | © 2006 Apple Computer, Inc. All Rights Reserved. CONTENTS OBJECT_FILE_DIR 22 OBJECT_FILE_DIR_<VARIANT> 22 OBJROOT (Intermediate Build Files Path) 23 PROJECT_TEMP_DIR 23 REZ_COLLECTOR_DIR 23 REZ_OBJECTS_DIR 24 SDKROOT (SDK Path) 24 SHARED_PRECOMPS_DIR (Precompiled Headers Cache Path) 24 SKIP_INSTALL 25 SRCROOT 25 SYMROOT (Build Products Path) 25 TARGET_BUILD_DIR 26 TARGET_TEMP_DIR 26 Compiler Build Settings 27 ALWAYS_SEARCH_USER_PATHS (Always Search User Paths) 27 FRAMEWORK_SEARCH_PATHS (Framework Search Paths) 27 GCC_AUTO_VECTORIZATION (Auto-Vectorization) 28 GCC_CW_ASM_SYNTAX (CodeWarrior-Style Inline Assembly) 28 GCC_DEBUGGING_SYMBOLS (Level of Debug Symbols) 28 GCC_DYNAMIC_NO_PIC 29 GCC_ENABLE_CPP_EXCEPTIONS (Enable C++ Exceptions) 29 GCC_ENABLE_CPP_RTTI (Enable C++ Runtime Types) 29 GCC_ENABLE_FIX_AND_CONTINUE (Fix & Continue) 30 GCC_ENABLE_OBJC_EXCEPTIONS (Enable Objective-C Exceptions) 30 GCC_ENABLE_SSE3_EXTENSIONS (Enable SSE3 Extensions) 30 GCC_ENABLE_SYMBOL_SEPARATION (Separate PCH Symbols) 30 GCC_FEEDBACK_DIRECTED_OPTIMIZATION (Feedback-Directed Optimization) 31 GCC_GENERATE_DEBUGGING_SYMBOLS (Generate Debug Symbols) 31 GCC_MODEL_TUNING (Instruction Scheduling) 32 GCC_OBJC_CALL_CXX_CDTORS (Call C++ Default Ctors/Dtors in Objective-C) 32 GCC_OPTIMIZATION_LEVEL (Optimization Level) 32 GCC_PRECOMPILE_PREFIX_HEADER (Precompile Prefix Header) 33 GCC_PREFIX_HEADER 33 GCC_PREPROCESSOR_DEFINITIONS (Preprocessor Macros) 33 GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS (Preprocessor Macros Not Used In Precompiled Headers) 34 GCC_SYMBOLS_PRIVATE_EXTERN (Symbols Hidden by Default) 34 GCC_THREADSAFE_STATICS (Statics are Thread Safe) 35 GCC_UNROLL_LOOPS (Unroll Loops) 35 GCC_USE_NASM_FOR_ASM_FILETYPE (Use nasm to Process .asm Files) 35 GCC_VERSION 35 GCC_VERSION_IDENTIFIER 36 GCC_WARN_ABOUT_RETURN_TYPE (Mismatched Return Type) 36 GCC_WARN_UNUSED_VARIABLE (Unused Variables) 36 GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS (Effective C++ Violation) 37 GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS (Hidden Virtual Functions) 37 4 2006-10-03 | © 2006 Apple Computer, Inc. All Rights Reserved. CONTENTS GCC_WARN_INHIBIT_ALL_WARNINGS (Inhibit All Warnings) 37 GCC_WARN_NON_VIRTUAL_DESTRUCTOR (Nonvirtual Destructor) 38 GCC_WARN_PEDANTIC (Pedantic Warnings) 38 GCC_WARN_SHADOW (Hidden Local Variables) 38 GCC_WARN_SIGN_COMPARE (Sign Comparison) 38 HEADER_SEARCH_PATHS (Header Search Paths) 39 MACOSX_DEPLOYMENT_TARGET (Mac OS X Deployment Target 39 OTHER_CFLAGS (Other C Flags) 40 OTHER_CFLAGS_<VARIANT> 40 OTHER_CPLUSPLUSFLAGS (Other C++ Flags) 40 PER_ARCH_CFLAGS_<ARCH> 41 USER_HEADER_SEARCH_PATHS (User Header Search Paths) 41 WARNING_CFLAGS (Other Warning Flags) 41 Linker Build Settings 42 DEAD_CODE_STRIPPING (Dead Code Stripping) 42 EXPORTED_SYMBOLS_FILE (Exported Symbols File) 42 KEEP_PRIVATE_EXTERNS (Preserve Private External Symbols) 42 LIBRARY_SEARCH_PATHS 43 LINK_WITH_STANDARD_LIBRARIES (Link With Standard Libraries) 43 LINKER_DISPLAYS_FILE_FOR_UNDEFINED_SYMBOLS (Verbose Undefined Symbols Info) 43 LINKER_DISPLAYS_MANGLED_NAMES (Display Mangled Names) 44 ONLY_LINK_ESSENTIAL_SYMBOLS (Only Link Essential Symbols) 44 OTHER_LDFLAGS (Other Linker Flags) 44 OTHER_LDFLAGS_<ARCH> 45 OTHER_LDFLAGS_<VARIANT> 45 OTHER_LDFLAGS_<VARIANT>_<ARCH> 45 PREBINDING (Prebinding) 45 PRESERVE_DEAD_CODE_INITS_AND_TERMS (Don’t Dead-Strip Inits and Terms) 46 STANDARD_C_PLUS_PLUS_LIBRARY_TYPE (C++ Standard Library Type) 46 STRIP_INSTALLED_PRODUCT (Strip Linked Product) 47 STRIP_STYLE (Strip Style) 47 UNEXPORTED_SYMBOLS_FILE (Unexported Symbols File) 47 ZERO_LINK (ZeroLink) 48 Product Layout Build Settings 48 CONTENTS_FOLDER_PATH 48 INFOPLIST_PATH 48 INFOSTRINGS_PATH 49 FRAMEWORKS_FOLDER_PATH 49 GENERATE_PKGINFO_FILE 49 DOCUMENTATION_FOLDER_PATH 49 EXECUTABLES_FOLDER_PATH 49 EXECUTABLE_EXTENSION 50 EXECUTABLE_FOLDER_PATH 50 EXECUTABLE_NAME 50 EXECUTABLE_PREFIX 51 5 2006-10-03 | © 2006 Apple Computer, Inc. All Rights Reserved. CONTENTS EXECUTABLE_SUFFIX 51 PACKAGE_TYPE 51 PLUGINS_FOLDER_PATH 51 PRIVATE_HEADERS_FOLDER_PATH 52 PKGINFO_FILE_PATH 52 PUBLIC_HEADERS_FOLDER_PATH 52 SCRIPTS_FOLDER_PATH 52 SHARED_FRAMEWORKS_FOLDER_PATH 53 UNLOCALIZED_RESOURCES_FOLDER_PATH 53 WRAPPER_EXTENSION (Wrapper Extension) 53 WRAPPER_NAME 53 WRAPPER_SUFFIX 54 Copy Build Settings 54 COPY_PHASE_STRIP (Strip Debug Symbols During Copy) 54 INSTALLHDRS_COPY_PHASE 54 INSTALLHDRS_SCRIPT_PHASE 55 REMOVE_CVS_FROM_RESOURCES 55 REMOVE_SVN_FROM_RESOURCES 55 VERBOSE_PBXCP 56 User Location Build Settings 56 HOME 56 USER_LIBRARY_DIR 56 System Location Build Setting 56 SYSTEM_LIBRARY_DIR 57 Document Revision History 59 6 2006-10-03 | © 2006 Apple Computer, Inc. All Rights Reserved. CHAPTER 1 Introduction to Xcode Build Setting Reference Xcode uses build settings to specify aspects of the build process followed to generate a product. As explained in Xcode 2 User 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. To fully understand how a target’s build settings affect a build and how they relate to one another, this appendix