Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """This script is used to download prebuilt clang binaries. | 6 """This script is used to download prebuilt clang binaries. |
| 7 | 7 |
| 8 It is also used by package.py to build the prebuilt clang binaries.""" | 8 It is also used by package.py to build the prebuilt clang binaries.""" |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 # Do NOT CHANGE this if you don't know what you're doing -- see | 27 # Do NOT CHANGE this if you don't know what you're doing -- see |
| 28 # https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md | 28 # https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md |
| 29 # Reverting problematic clang rolls is safe, though. | 29 # Reverting problematic clang rolls is safe, though. |
| 30 CLANG_REVISION = '288545' | 30 CLANG_REVISION = '288545' |
| 31 | 31 |
| 32 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ | 32 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ |
| 33 if use_head_revision: | 33 if use_head_revision: |
| 34 CLANG_REVISION = 'HEAD' | 34 CLANG_REVISION = 'HEAD' |
| 35 | 35 |
| 36 # This is incremented when pushing a new build of Clang at the same revision. | 36 # This is incremented when pushing a new build of Clang at the same revision. |
| 37 CLANG_SUB_REVISION=1 | 37 CLANG_SUB_REVISION=2016121301 |
| 38 | 38 |
| 39 PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION) | 39 PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION) |
| 40 | 40 |
| 41 # Path constants. (All of these should be absolute paths.) | 41 # Path constants. (All of these should be absolute paths.) |
| 42 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) | 42 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) |
| 43 CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) | 43 CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) |
| 44 THIRD_PARTY_DIR = os.path.join(CHROMIUM_DIR, 'third_party') | 44 THIRD_PARTY_DIR = os.path.join(CHROMIUM_DIR, 'third_party') |
| 45 LLVM_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm') | 45 LLVM_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm') |
| 46 LLVM_BOOTSTRAP_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-bootstrap') | 46 LLVM_BOOTSTRAP_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-bootstrap') |
| 47 LLVM_BOOTSTRAP_INSTALL_DIR = os.path.join(THIRD_PARTY_DIR, | 47 LLVM_BOOTSTRAP_INSTALL_DIR = os.path.join(THIRD_PARTY_DIR, |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 450 | 450 |
| 451 DownloadHostGcc(args) | 451 DownloadHostGcc(args) |
| 452 AddSvnToPathOnWin() | 452 AddSvnToPathOnWin() |
| 453 AddCMakeToPath() | 453 AddCMakeToPath() |
| 454 AddGnuWinToPath() | 454 AddGnuWinToPath() |
| 455 | 455 |
| 456 DeleteChromeToolsShim() | 456 DeleteChromeToolsShim() |
| 457 | 457 |
| 458 Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) | 458 Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) |
| 459 Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR) | 459 Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR) |
| 460 if sys.platform == 'win32' or use_head_revision: | 460 if sys.platform == 'win32' or sys.platform.startswith('linux') or use_head_rev ision: |
|
Nico
2016/12/14 23:39:13
Sending this to the upload bots just cost me over
| |
| 461 Checkout('LLD', LLVM_REPO_URL + '/lld/trunk', LLD_DIR) | 461 Checkout('LLD', LLVM_REPO_URL + '/lld/trunk', LLD_DIR) |
| 462 Checkout('compiler-rt', LLVM_REPO_URL + '/compiler-rt/trunk', COMPILER_RT_DIR) | 462 Checkout('compiler-rt', LLVM_REPO_URL + '/compiler-rt/trunk', COMPILER_RT_DIR) |
| 463 if sys.platform == 'darwin': | 463 if sys.platform == 'darwin': |
| 464 # clang needs a libc++ checkout, else -stdlib=libc++ won't find includes | 464 # clang needs a libc++ checkout, else -stdlib=libc++ won't find includes |
| 465 # (i.e. this is needed for bootstrap builds). | 465 # (i.e. this is needed for bootstrap builds). |
| 466 Checkout('libcxx', LLVM_REPO_URL + '/libcxx/trunk', LIBCXX_DIR) | 466 Checkout('libcxx', LLVM_REPO_URL + '/libcxx/trunk', LIBCXX_DIR) |
| 467 # We used to check out libcxxabi on OS X; we no longer need that. | 467 # We used to check out libcxxabi on OS X; we no longer need that. |
| 468 if os.path.exists(LIBCXXABI_DIR): | 468 if os.path.exists(LIBCXXABI_DIR): |
| 469 RmTree(LIBCXXABI_DIR) | 469 RmTree(LIBCXXABI_DIR) |
| 470 | 470 |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 895 args.force_local_build = True | 895 args.force_local_build = True |
| 896 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 896 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 897 # Only build the Android ASan rt on ToT bots when targetting Android. | 897 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 898 args.with_android = False | 898 args.with_android = False |
| 899 | 899 |
| 900 return UpdateClang(args) | 900 return UpdateClang(args) |
| 901 | 901 |
| 902 | 902 |
| 903 if __name__ == '__main__': | 903 if __name__ == '__main__': |
| 904 sys.exit(main()) | 904 sys.exit(main()) |
| OLD | NEW |