Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index fcf785793f122a2dcf4e44173a91272c1dbda4c2..6663455ac7af7d37dfce5f7e9ad94bbabd473a28 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -345,14 +345,6 @@ |
# for details. |
'chromium_win_pch%': 0, |
- # iOS SDK and deployment target support. The iOS 5.0 SDK is actually |
- # what is required, but the value is left blank so when it is set in |
- # the project files it will be the "current" iOS SDK. Forcing 5.0 |
- # even though it is "current" causes Xcode to spit out a warning for |
- # every single project file for not using the "current" SDK. |
- 'ios_sdk%': '', |
- 'ios_deployment_target%': '4.3', |
- |
# Set this to true when building with Clang. |
# See http://code.google.com/p/chromium/wiki/Clang for details. |
'clang%': 0, |
@@ -648,8 +640,6 @@ |
'enable_extensions%': '<(enable_extensions)', |
'enable_web_intents%': '<(enable_web_intents)', |
'enable_web_intents_tag%': '<(enable_web_intents_tag)', |
- 'ios_sdk%': '<(ios_sdk)', |
- 'ios_deployment_target%': '<(ios_deployment_target)', |
'enable_plugin_installation%': '<(enable_plugin_installation)', |
'enable_protector_service%': '<(enable_protector_service)', |
'enable_session_service%': '<(enable_session_service)', |
@@ -703,26 +693,6 @@ |
# Linux-Mac cross compiler distcc farm. |
'chromium_mac_pch%': 1, |
- # Mac OS X SDK and deployment target support. |
- # The SDK identifies the version of the system headers that will be used, |
- # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro. |
- # "Maximum allowed" refers to the operating system version whose APIs are |
- # available in the headers. |
- # The deployment target identifies the minimum system version that the |
- # built products are expected to function on. It corresponds to the |
- # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. |
- # To ensure these macros are available, #include <AvailabilityMacros.h>. |
- # Additional documentation on these macros is available at |
- # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
- # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
- # deployment target to 10.6. Other projects, such as O3D, may override |
- # these defaults. If the SDK is installed someplace that Xcode doesn't |
- # know about, set mac_sdk_path to the path to the SDK. If set to a |
- # non-empty string, mac_sdk_path will be used in preference to mac_sdk. |
- # mac_sdk gets its default value elsewhere in this file. |
- 'mac_sdk_path%': '', |
- 'mac_deployment_target%': '10.6', |
- |
# The default value for mac_strip in target_defaults. This cannot be |
# set there, per the comment about variable% in a target_defaults. |
'mac_strip_release%': 1, |
@@ -994,6 +964,15 @@ |
# sub-builds. This allows the Mac sub-build SDK in an iOS build to be |
# overridden from the command line the same way it is for a Mac build. |
'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)', |
+ |
+ # iOS SDK and deployment target support. The iOS 5.0 SDK is actually |
+ # what is required, but the value is left blank so when it is set in |
+ # the project files it will be the "current" iOS SDK. Forcing 5.0 |
+ # even though it is "current" causes Xcode to spit out a warning for |
+ # every single project file for not using the "current" SDK. |
+ 'ios_sdk%': '', |
+ 'ios_sdk_path%': '', |
+ 'ios_deployment_target%': '4.3', |
}], |
['OS=="android"', { |
# Location of Android NDK. |
@@ -1104,8 +1083,41 @@ |
'android_build_type%': '<(android_build_type)', |
}], # OS=="android" |
['OS=="mac"', { |
+ 'variables': { |
+ # Mac OS X SDK and deployment target support. The SDK identifies |
+ # the version of the system headers that will be used, and |
+ # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time |
+ # macro. "Maximum allowed" refers to the operating system version |
+ # whose APIs are available in the headers. The deployment target |
+ # identifies the minimum system version that the built products are |
+ # expected to function on. It corresponds to the |
+ # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these |
+ # macros are available, #include <AvailabilityMacros.h>. Additional |
+ # documentation on these macros is available at |
+ # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
+ # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
+ # deployment target to 10.6. Other projects, such as O3D, may |
+ # override these defaults. |
+ |
+ # Normally, mac_sdk_min is used to find an SDK that Xcode knows |
+ # about that is at least the specified version. In official builds, |
+ # the SDK must match mac_sdk_min exactly. If the SDK is installed |
+ # someplace that Xcode doesn't know about, set mac_sdk_path to the |
+ # path to the SDK; when set to a non-empty string, SDK detection |
+ # based on mac_sdk_min will be bypassed entirely. |
+ 'mac_sdk_min%': '10.6', |
+ 'mac_sdk_path%': '', |
+ |
+ 'mac_deployment_target%': '10.6', |
+ }, |
+ |
+ 'mac_sdk_min': '<(mac_sdk_min)', |
+ 'mac_sdk_path': '<(mac_sdk_path)', |
+ 'mac_deployment_target': '<(mac_deployment_target)', |
+ |
# Enable clang on mac by default! |
'clang%': 1, |
+ |
# Compile in Breakpad support by default so that it can be |
# tested, even if it is not enabled by default at runtime. |
'mac_breakpad_compiled_in%': 1, |
@@ -1122,7 +1134,7 @@ |
}], |
['branding=="Chrome" and buildtype=="Official"', { |
- 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify 10.6)', |
+ 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))', |
# Enable uploading crash dumps. |
'mac_breakpad_uploads%': 1, |
# Enable dumping symbols at build time for use by Mac Breakpad. |
@@ -1130,7 +1142,7 @@ |
# Enable Keystone auto-update support. |
'mac_keystone%': 1, |
}, { # else: branding!="Chrome" or buildtype!="Official" |
- 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)', |
+ 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', |
'mac_breakpad_uploads%': 0, |
'mac_breakpad%': 0, |
'mac_keystone%': 0, |
@@ -3541,17 +3553,23 @@ |
# setting sets the SDK on a project-wide basis. In order to get the |
# configured SDK to show properly in the Xcode UI, SDKROOT must be set |
# here at the project level. |
- ['mac_sdk_path==""', { |
+ ['OS=="mac"', { |
'conditions': [ |
- ['OS=="mac"', { |
+ ['mac_sdk_path==""', { |
'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
+ }, { |
+ 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
}], |
- ['OS=="ios"', { |
+ ], |
+ }], |
+ ['OS=="ios"', { |
+ 'conditions': [ |
+ ['ios_sdk_path==""', { |
'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot |
+ }, { |
+ 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
}], |
], |
- }, { # else: mac_sdk_path!="" |
- 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
}], |
['OS=="ios"', { |
# Just build armv7 since iOS 4.3+ only supports armv7. |