| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 'https://commondatastorage.googleapis.com/chromium-browser-clang') | 80 'https://commondatastorage.googleapis.com/chromium-browser-clang') |
| 81 | 81 |
| 82 LLVM_REPO_URL='https://llvm.org/svn/llvm-project' | 82 LLVM_REPO_URL='https://llvm.org/svn/llvm-project' |
| 83 if 'LLVM_REPO_URL' in os.environ: | 83 if 'LLVM_REPO_URL' in os.environ: |
| 84 LLVM_REPO_URL = os.environ['LLVM_REPO_URL'] | 84 LLVM_REPO_URL = os.environ['LLVM_REPO_URL'] |
| 85 | 85 |
| 86 # Bump after VC updates. | 86 # Bump after VC updates. |
| 87 DIA_DLL = { | 87 DIA_DLL = { |
| 88 '2013': 'msdia120.dll', | 88 '2013': 'msdia120.dll', |
| 89 '2015': 'msdia140.dll', | 89 '2015': 'msdia140.dll', |
| 90 '2017': 'msdia140.dll', |
| 90 } | 91 } |
| 91 | 92 |
| 92 | 93 |
| 93 def DownloadUrl(url, output_file): | 94 def DownloadUrl(url, output_file): |
| 94 """Download url into output_file.""" | 95 """Download url into output_file.""" |
| 95 CHUNK_SIZE = 4096 | 96 CHUNK_SIZE = 4096 |
| 96 TOTAL_DOTS = 10 | 97 TOTAL_DOTS = 10 |
| 97 num_retries = 3 | 98 num_retries = 3 |
| 98 retry_wait_s = 5 # Doubled at each retry. | 99 retry_wait_s = 5 # Doubled at each retry. |
| 99 | 100 |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 args.force_local_build = True | 908 args.force_local_build = True |
| 908 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 909 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 909 # Only build the Android ASan rt on ToT bots when targetting Android. | 910 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 910 args.with_android = False | 911 args.with_android = False |
| 911 | 912 |
| 912 return UpdateClang(args) | 913 return UpdateClang(args) |
| 913 | 914 |
| 914 | 915 |
| 915 if __name__ == '__main__': | 916 if __name__ == '__main__': |
| 916 sys.exit(main()) | 917 sys.exit(main()) |
| OLD | NEW |