| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 if not os.path.exists(gcc_dir): | 308 if not os.path.exists(gcc_dir): |
| 309 print 'Downloading pre-built GCC 4.8.2...' | 309 print 'Downloading pre-built GCC 4.8.2...' |
| 310 DownloadAndUnpack( | 310 DownloadAndUnpack( |
| 311 CDS_URL + '/tools/gcc482precise.tgz', LLVM_BUILD_TOOLS_DIR) | 311 CDS_URL + '/tools/gcc482precise.tgz', LLVM_BUILD_TOOLS_DIR) |
| 312 args.gcc_toolchain = gcc_dir | 312 args.gcc_toolchain = gcc_dir |
| 313 | 313 |
| 314 | 314 |
| 315 def AddCMakeToPath(): | 315 def AddCMakeToPath(): |
| 316 """Download CMake and add it to PATH.""" | 316 """Download CMake and add it to PATH.""" |
| 317 if sys.platform == 'win32': | 317 if sys.platform == 'win32': |
| 318 zip_name = 'cmake-3.2.2-win32-x86.zip' | 318 zip_name = 'cmake-3.4.3-win32-x86.zip' |
| 319 cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, | 319 cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, |
| 320 'cmake-3.2.2-win32-x86', 'bin') | 320 'cmake-3.4.3-win32-x86', 'bin') |
| 321 else: | 321 else: |
| 322 suffix = 'Darwin' if sys.platform == 'darwin' else 'Linux' | 322 suffix = 'Darwin' if sys.platform == 'darwin' else 'Linux' |
| 323 zip_name = 'cmake322_%s.tgz' % suffix | 323 zip_name = 'cmake343_%s.tgz' % suffix |
| 324 cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake322', 'bin') | 324 cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake343', 'bin') |
| 325 if not os.path.exists(cmake_dir): | 325 if not os.path.exists(cmake_dir): |
| 326 DownloadAndUnpack(CDS_URL + '/tools/' + zip_name, LLVM_BUILD_TOOLS_DIR) | 326 DownloadAndUnpack(CDS_URL + '/tools/' + zip_name, LLVM_BUILD_TOOLS_DIR) |
| 327 os.environ['PATH'] = cmake_dir + os.pathsep + os.environ.get('PATH', '') | 327 os.environ['PATH'] = cmake_dir + os.pathsep + os.environ.get('PATH', '') |
| 328 | 328 |
| 329 | 329 |
| 330 def AddGnuWinToPath(): | 330 def AddGnuWinToPath(): |
| 331 """Download some GNU win tools and add them to PATH.""" | 331 """Download some GNU win tools and add them to PATH.""" |
| 332 if sys.platform != 'win32': | 332 if sys.platform != 'win32': |
| 333 return | 333 return |
| 334 | 334 |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 args.force_local_build = True | 878 args.force_local_build = True |
| 879 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 879 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 880 # Only build the Android ASan rt on ToT bots when targetting Android. | 880 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 881 args.with_android = False | 881 args.with_android = False |
| 882 | 882 |
| 883 return UpdateClang(args) | 883 return UpdateClang(args) |
| 884 | 884 |
| 885 | 885 |
| 886 if __name__ == '__main__': | 886 if __name__ == '__main__': |
| 887 sys.exit(main()) | 887 sys.exit(main()) |
| OLD | NEW |