Commit 09911854 authored by erikchen's avatar erikchen Committed by Commit Bot

Revert of mac: Roll hermetic toolchain to Xcode 8.3.2. (patchset #2 id:20001...

Revert of mac: Roll hermetic toolchain to Xcode 8.3.2. (patchset #2 id:20001 of https://codereview.chromium.org/2950933003/ )

Reason for revert:
Reverting. Failed to update all perf Mac Builder slaves to 10.12.

Original issue's description:
> mac: Roll hermetic toolchain to Xcode 8.3.2.
>
> Xcode 8.3.2 requires macOS 10.12+. This version of Xcode 8.3.2 has both the
> 10.10 and 10.12 SDKs, and builds will continue to use the 10.10 SDK.
>
> To support machines running macOS versions < 10.12, but don't require building
> targets, this CL also:
>   * Does not download the hermetic toolchain if the macOS version does not
>     support the toolchain version.
>   * Does not allow building targets with the default hermetic toolchain if the
>     macOS version does not support the toolchain version.
>
> BUG=624049
>
> Review-Url: https://codereview.chromium.org/2950933003
> Cr-Original-Commit-Position: refs/heads/master@{#481225}
> Committed: https://chromium.googlesource.com/chromium/src/+/2f19b143e444c920e643feda583e9ceb72d29c8e
> Review-Url: https://codereview.chromium.org/2950933003
> Cr-Commit-Position: refs/heads/master@{#481692}
> Committed: https://chromium.googlesource.com/chromium/src/+/350127923178be13e901e047ea5719890e7af365

TBR=dpranke@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=624049

Review-Url: https://codereview.chromium.org/2957483002
Cr-Commit-Position: refs/heads/master@{#481733}
parent a58aca05
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
""" """Prints "1" if Chrome targets should be built with hermetic xcode. Otherwise
Prints "1" if Chrome targets should be built with hermetic Xcode. prints "0".
Prints "2" if Chrome targets should be built with hermetic Xcode, but the OS
version does not meet the minimum requirements of the hermetic version of Xcode.
Otherwise prints "0".
Usage: Usage:
python should_use_hermetic_xcode.py <target_os> python should_use_hermetic_xcode.py <target_os>
...@@ -16,12 +13,6 @@ Usage: ...@@ -16,12 +13,6 @@ Usage:
import os import os
import sys import sys
_THIS_DIR_PATH = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
_BUILD_PATH = os.path.join(_THIS_DIR_PATH, os.pardir)
sys.path.insert(0, _BUILD_PATH)
import mac_toolchain
def _IsCorpMachine(): def _IsCorpMachine():
return os.path.isdir('/Library/GoogleCorpSupport/') return os.path.isdir('/Library/GoogleCorpSupport/')
...@@ -30,8 +21,6 @@ def _IsCorpMachine(): ...@@ -30,8 +21,6 @@ def _IsCorpMachine():
def main(): def main():
allow_corp = sys.argv[1] == 'mac' and _IsCorpMachine() allow_corp = sys.argv[1] == 'mac' and _IsCorpMachine()
if os.environ.get('FORCE_MAC_TOOLCHAIN') or allow_corp: if os.environ.get('FORCE_MAC_TOOLCHAIN') or allow_corp:
if not mac_toolchain.PlatformMeetsHermeticXcodeRequirements(sys.argv[1]):
return "2"
return "1" return "1"
else: else:
return "0" return "0"
......
...@@ -14,7 +14,6 @@ date: ...@@ -14,7 +14,6 @@ date:
""" """
import os import os
import platform
import plistlib import plistlib
import shutil import shutil
import subprocess import subprocess
...@@ -25,14 +24,10 @@ import tempfile ...@@ -25,14 +24,10 @@ import tempfile
import urllib2 import urllib2
# This can be changed after running /build/package_mac_toolchain.py. # This can be changed after running /build/package_mac_toolchain.py.
MAC_TOOLCHAIN_VERSION = '8E2002' MAC_TOOLCHAIN_VERSION = '5B1008'
MAC_TOOLCHAIN_SUB_REVISION = 3 MAC_TOOLCHAIN_SUB_REVISION = 3
MAC_TOOLCHAIN_VERSION = '%s-%s' % (MAC_TOOLCHAIN_VERSION, MAC_TOOLCHAIN_VERSION = '%s-%s' % (MAC_TOOLCHAIN_VERSION,
MAC_TOOLCHAIN_SUB_REVISION) 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_VERSION = '8C1002'
IOS_TOOLCHAIN_SUB_REVISION = 1 IOS_TOOLCHAIN_SUB_REVISION = 1
IOS_TOOLCHAIN_VERSION = '%s-%s' % (IOS_TOOLCHAIN_VERSION, IOS_TOOLCHAIN_VERSION = '%s-%s' % (IOS_TOOLCHAIN_VERSION,
...@@ -49,13 +44,6 @@ TOOLCHAIN_BUILD_DIR = os.path.join(BASE_DIR, '%s_files', 'Xcode.app') ...@@ -49,13 +44,6 @@ TOOLCHAIN_BUILD_DIR = os.path.join(BASE_DIR, '%s_files', 'Xcode.app')
STAMP_FILE = os.path.join(BASE_DIR, '%s_files', 'toolchain_build_revision') STAMP_FILE = os.path.join(BASE_DIR, '%s_files', 'toolchain_build_revision')
TOOLCHAIN_URL = 'gs://chrome-mac-sdk/' 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(): def GetPlatforms():
default_target_os = ["mac"] default_target_os = ["mac"]
try: try:
...@@ -244,10 +232,6 @@ def main(): ...@@ -244,10 +232,6 @@ def main():
return 0 return 0
for target_os in GetPlatforms(): for target_os in GetPlatforms():
if not PlatformMeetsHermeticXcodeRequirements(target_os):
print 'OS version does not support toolchain.'
continue
if target_os == 'ios': if target_os == 'ios':
default_version = IOS_TOOLCHAIN_VERSION default_version = IOS_TOOLCHAIN_VERSION
toolchain_filename = 'ios-toolchain-%s.tgz' toolchain_filename = 'ios-toolchain-%s.tgz'
......
...@@ -58,8 +58,5 @@ if (use_system_xcode == "") { ...@@ -58,8 +58,5 @@ if (use_system_xcode == "") {
_result = exec_script("//build/mac/should_use_hermetic_xcode.py", _result = exec_script("//build/mac/should_use_hermetic_xcode.py",
[ target_os ], [ target_os ],
"value") "value")
assert(_result != 2,
"Do not allow building targets with the default" +
"hermetic toolchain if the minimum OS version is not met.")
use_system_xcode = _result == 0 use_system_xcode = _result == 0
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment