Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 194713003: Enable 64-bit architectures by default for Xcode 5.1 and higher (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Improved comment & remove patch 2 Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/xcode_emulation.py
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index d6fe8f5aeb7fc56e42b74afb563f3b91e054fb8d..f9f0543854af8e362b1a4b74cfccbfa2e7c65fd0 100644
--- a/pylib/gyp/xcode_emulation.py
+++ b/pylib/gyp/xcode_emulation.py
@@ -944,14 +944,20 @@ class XcodeSettings(object):
# For Mac projects, Xcode changed the default value used when ARCHS is not
# set from "i386" to "x86_64".
#
- # For iOS projects, if ARCHS is unset, it defaults to "armv7 armv7s" when
- # building for a device, and the simulator binaries are always build for
- # "i386".
+ # For iOS projects, the value used when ARCHS is unset depends on the
+ # version of Xcode. The following array summarize the default used:
#
- # For new projects, ARCHS is set to $(ARCHS_STANDARD_INCLUDING_64_BIT),
- # which correspond to "armv7 armv7s arm64", and when building the simulator
- # the architecture is either "i386" or "x86_64" depending on the simulated
- # device (respectively 32-bit or 64-bit device).
+ # Xcode Version | ARCHS for simulator | ARCHS for device
+ # ---------------+---------------------+--------------------
+ # < 5.0 | i386 | armv7 armv7s
+ # < 5.1 (*) | i386 x86_64 | armv7 armv7s arm64
+ # >= 5.1 (**) | i386 x86_64 | armv7 armv7s arm64
+ #
+ # (*): the default is $(ARCHS_STANDARD_INCLUDING_64_BIT) instead of the
+ # default of $(ARCHS_STANDARD) used by previous versions of Xcode.
+ #
+ # (**): the default is back to $(ARCHS_STANDARD), but the macro has been
+ # updated to also include 64-bit architectures.
#
# Since the value returned by this function is only used when ARCHS is not
# set, then on iOS we return "i386", as the default xcode project generator
@@ -1451,7 +1457,7 @@ def _IOSDefaultArchForSDKRoot(sdkroot):
return {'$(ARCHS_STANDARD)': ['armv7']}
else:
return {'$(ARCHS_STANDARD)': ['i386']}
- else:
+ elif xcode_version < '0510':
if _IOSIsDeviceSDKROOT(sdkroot):
return {
'$(ARCHS_STANDARD)': ['armv7', 'armv7s'],
@@ -1462,6 +1468,17 @@ def _IOSDefaultArchForSDKRoot(sdkroot):
'$(ARCHS_STANDARD)': ['i386'],
'$(ARCHS_STANDARD_INCLUDING_64_BIT)': ['i386', 'x86_64'],
}
+ else:
+ if _IOSIsDeviceSDKROOT(sdkroot):
+ return {
+ '$(ARCHS_STANDARD)': ['armv7', 'armv7s', 'arm64'],
+ '$(ARCHS_STANDARD_INCLUDING_64_BIT)': ['armv7', 'armv7s', 'arm64'],
+ }
+ else:
+ return {
+ '$(ARCHS_STANDARD)': ['i386', 'x86_64'],
+ '$(ARCHS_STANDARD_INCLUDING_64_BIT)': ['i386', 'x86_64'],
+ }
def _FilterIOSArchitectureForSDKROOT(xcode_settings):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698