Skip to content

Commit

Permalink
Revert of mac: Roll hermetic toolchain to Xcode 8.3.2. (patchset Piss…
Browse files Browse the repository at this point in the history
…andshittium#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}
  • Loading branch information
erikchen authored and Commit Bot committed Jun 23, 2017
1 parent a58aca0 commit 0991185
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 33 deletions.
15 changes: 2 additions & 13 deletions build/mac/should_use_hermetic_xcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""
Prints "1" if Chrome targets should be built with hermetic Xcode.
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".
"""Prints "1" if Chrome targets should be built with hermetic xcode. Otherwise
prints "0".
Usage:
python should_use_hermetic_xcode.py <target_os>
Expand All @@ -16,12 +13,6 @@
import os
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():
return os.path.isdir('/Library/GoogleCorpSupport/')
Expand All @@ -30,8 +21,6 @@ def _IsCorpMachine():
def main():
allow_corp = sys.argv[1] == 'mac' and _IsCorpMachine()
if os.environ.get('FORCE_MAC_TOOLCHAIN') or allow_corp:
if not mac_toolchain.PlatformMeetsHermeticXcodeRequirements(sys.argv[1]):
return "2"
return "1"
else:
return "0"
Expand Down
18 changes: 1 addition & 17 deletions build/mac_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"""

import os
import platform
import plistlib
import shutil
import subprocess
Expand All @@ -25,14 +24,10 @@
import urllib2

# 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_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,
Expand All @@ -49,13 +44,6 @@
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:
Expand Down Expand Up @@ -244,10 +232,6 @@ 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'
Expand Down
3 changes: 0 additions & 3 deletions build_overrides/build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,5 @@ if (use_system_xcode == "") {
_result = exec_script("//build/mac/should_use_hermetic_xcode.py",
[ target_os ],
"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
}

0 comments on commit 0991185

Please sign in to comment.