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

Unified Diff: build/mac_toolchain.py

Issue 2950933003: mac: Roll hermetic toolchain to Xcode 8.3.2. (Closed)
Patch Set: Add comment. Created 3 years, 6 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 | « build/mac/should_use_hermetic_xcode.py ('k') | build_overrides/build.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/mac_toolchain.py
diff --git a/build/mac_toolchain.py b/build/mac_toolchain.py
index 123e5e0d3c0596fe2fb5db214be11477c86ce871..534f9d1982befa883861354b26d1cc7749f8c106 100755
--- a/build/mac_toolchain.py
+++ b/build/mac_toolchain.py
@@ -14,6 +14,7 @@ date:
"""
import os
+import platform
import plistlib
import shutil
import subprocess
@@ -24,10 +25,14 @@ import tempfile
import urllib2
# This can be changed after running /build/package_mac_toolchain.py.
-MAC_TOOLCHAIN_VERSION = '5B1008'
+MAC_TOOLCHAIN_VERSION = '8E2002'
MAC_TOOLCHAIN_SUB_REVISION = 3
MAC_TOOLCHAIN_VERSION = '%s-%s' % (MAC_TOOLCHAIN_VERSION,
MAC_TOOLCHAIN_SUB_REVISION)
+# The toolchain will not be downloaded if the minimum OS version is not met.
+# 16 is the major version number for macOS 10.12.
+MAC_MINIMUM_OS_VERSION = 16
+
IOS_TOOLCHAIN_VERSION = '8C1002'
IOS_TOOLCHAIN_SUB_REVISION = 1
IOS_TOOLCHAIN_VERSION = '%s-%s' % (IOS_TOOLCHAIN_VERSION,
@@ -44,6 +49,13 @@ TOOLCHAIN_BUILD_DIR = os.path.join(BASE_DIR, '%s_files', 'Xcode.app')
STAMP_FILE = os.path.join(BASE_DIR, '%s_files', 'toolchain_build_revision')
TOOLCHAIN_URL = 'gs://chrome-mac-sdk/'
+
+def PlatformMeetsHermeticXcodeRequirements(target_os):
+ if target_os == 'ios':
+ return True
+ return int(platform.release().split('.')[0]) >= MAC_MINIMUM_OS_VERSION
+
+
def GetPlatforms():
default_target_os = ["mac"]
try:
@@ -232,6 +244,10 @@ def main():
return 0
for target_os in GetPlatforms():
+ if not PlatformMeetsHermeticXcodeRequirements(target_os):
+ print 'OS version does not support toolchain.'
+ continue
+
if target_os == 'ios':
default_version = IOS_TOOLCHAIN_VERSION
toolchain_filename = 'ios-toolchain-%s.tgz'
« no previous file with comments | « build/mac/should_use_hermetic_xcode.py ('k') | build_overrides/build.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698