| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 DownloadHostGcc(args) | 432 DownloadHostGcc(args) |
| 433 AddCMakeToPath() | 433 AddCMakeToPath() |
| 434 AddGnuWinToPath() | 434 AddGnuWinToPath() |
| 435 | 435 |
| 436 DeleteChromeToolsShim() | 436 DeleteChromeToolsShim() |
| 437 | 437 |
| 438 Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) | 438 Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) |
| 439 Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR) | 439 Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR) |
| 440 if sys.platform == 'win32' or use_head_revision: | 440 if sys.platform == 'win32' or use_head_revision: |
| 441 Checkout('LLD', LLVM_REPO_URL + '/lld/trunk', LLD_DIR) | 441 Checkout('LLD', LLVM_REPO_URL + '/lld/trunk', LLD_DIR) |
| 442 else: |
| 443 # Remove potential stale lld checkouts on the slaves. |
| 444 RmTree(LLD_DIR) |
| 442 Checkout('compiler-rt', LLVM_REPO_URL + '/compiler-rt/trunk', COMPILER_RT_DIR) | 445 Checkout('compiler-rt', LLVM_REPO_URL + '/compiler-rt/trunk', COMPILER_RT_DIR) |
| 443 if sys.platform == 'darwin': | 446 if sys.platform == 'darwin': |
| 444 # clang needs a libc++ checkout, else -stdlib=libc++ won't find includes | 447 # clang needs a libc++ checkout, else -stdlib=libc++ won't find includes |
| 445 # (i.e. this is needed for bootstrap builds). | 448 # (i.e. this is needed for bootstrap builds). |
| 446 Checkout('libcxx', LLVM_REPO_URL + '/libcxx/trunk', LIBCXX_DIR) | 449 Checkout('libcxx', LLVM_REPO_URL + '/libcxx/trunk', LIBCXX_DIR) |
| 447 # We used to check out libcxxabi on OS X; we no longer need that. | 450 # We used to check out libcxxabi on OS X; we no longer need that. |
| 448 if os.path.exists(LIBCXXABI_DIR): | 451 if os.path.exists(LIBCXXABI_DIR): |
| 449 RmTree(LIBCXXABI_DIR) | 452 RmTree(LIBCXXABI_DIR) |
| 450 | 453 |
| 451 cc, cxx = None, None | 454 cc, cxx = None, None |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 args.force_local_build = True | 888 args.force_local_build = True |
| 886 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 889 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 887 # Only build the Android ASan rt on ToT bots when targetting Android. | 890 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 888 args.with_android = False | 891 args.with_android = False |
| 889 | 892 |
| 890 return UpdateClang(args) | 893 return UpdateClang(args) |
| 891 | 894 |
| 892 | 895 |
| 893 if __name__ == '__main__': | 896 if __name__ == '__main__': |
| 894 sys.exit(main()) | 897 sys.exit(main()) |
| OLD | NEW |