| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """ | 6 """ |
| 7 If should_use_hermetic_xcode.py emits "1", and the current toolchain is out of | 7 If should_use_hermetic_xcode.py emits "1", and the current toolchain is out of |
| 8 date: | 8 date: |
| 9 * Downloads the hermetic mac toolchain | 9 * Downloads the hermetic mac toolchain |
| 10 * Requires gsutil to be configured. | 10 * Requires gsutil to be configured. |
| 11 * Accepts the license. | 11 * Accepts the license. |
| 12 * If xcode-select and xcodebuild are not passwordless in sudoers, requires | 12 * If xcode-select and xcodebuild are not passwordless in sudoers, requires |
| 13 user interaction. | 13 user interaction. |
| 14 """ | 14 """ |
| 15 | 15 |
| 16 import os | 16 import os |
| 17 import plistlib | 17 import plistlib |
| 18 import shutil | 18 import shutil |
| 19 import subprocess | 19 import subprocess |
| 20 import sys | 20 import sys |
| 21 import tarfile | 21 import tarfile |
| 22 import time | 22 import time |
| 23 import tempfile | 23 import tempfile |
| 24 import urllib2 | 24 import urllib2 |
| 25 | 25 |
| 26 # This can be changed after running /build/package_mac_toolchain.py. | 26 # This can be changed after running /build/package_mac_toolchain.py. |
| 27 MAC_TOOLCHAIN_VERSION = '8E2002' | 27 MAC_TOOLCHAIN_VERSION = '5B1008' |
| 28 MAC_TOOLCHAIN_SUB_REVISION = 3 | 28 MAC_TOOLCHAIN_SUB_REVISION = 3 |
| 29 MAC_TOOLCHAIN_VERSION = '%s-%s' % (MAC_TOOLCHAIN_VERSION, | 29 MAC_TOOLCHAIN_VERSION = '%s-%s' % (MAC_TOOLCHAIN_VERSION, |
| 30 MAC_TOOLCHAIN_SUB_REVISION) | 30 MAC_TOOLCHAIN_SUB_REVISION) |
| 31 IOS_TOOLCHAIN_VERSION = '8C1002' | 31 IOS_TOOLCHAIN_VERSION = '8C1002' |
| 32 IOS_TOOLCHAIN_SUB_REVISION = 1 | 32 IOS_TOOLCHAIN_SUB_REVISION = 1 |
| 33 IOS_TOOLCHAIN_VERSION = '%s-%s' % (IOS_TOOLCHAIN_VERSION, | 33 IOS_TOOLCHAIN_VERSION = '%s-%s' % (IOS_TOOLCHAIN_VERSION, |
| 34 IOS_TOOLCHAIN_SUB_REVISION) | 34 IOS_TOOLCHAIN_SUB_REVISION) |
| 35 | 35 |
| 36 # Absolute path to src/ directory. | 36 # Absolute path to src/ directory. |
| 37 REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 37 REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return_value = DownloadHermeticBuild( | 242 return_value = DownloadHermeticBuild( |
| 243 target_os, default_version, toolchain_filename) | 243 target_os, default_version, toolchain_filename) |
| 244 if return_value: | 244 if return_value: |
| 245 return return_value | 245 return return_value |
| 246 | 246 |
| 247 return 0 | 247 return 0 |
| 248 | 248 |
| 249 | 249 |
| 250 if __name__ == '__main__': | 250 if __name__ == '__main__': |
| 251 sys.exit(main()) | 251 sys.exit(main()) |
| OLD | NEW |