| 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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 # clang previously downloaded, keep it up-to-date. | 780 # clang previously downloaded, keep it up-to-date. |
| 781 # If you don't want this, delete third_party/llvm-build on your machine. | 781 # If you don't want this, delete third_party/llvm-build on your machine. |
| 782 if os.path.isdir(LLVM_BUILD_DIR): | 782 if os.path.isdir(LLVM_BUILD_DIR): |
| 783 is_clang_required = True | 783 is_clang_required = True |
| 784 if not is_clang_required: | 784 if not is_clang_required: |
| 785 return 0 | 785 return 0 |
| 786 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): | 786 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): |
| 787 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' | 787 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' |
| 788 return 0 | 788 return 0 |
| 789 | 789 |
| 790 if use_head_revision: |
| 791 # TODO(hans): Remove after the next roll. |
| 792 global VERSION |
| 793 VERSION = '3.9.0' |
| 794 |
| 790 global CLANG_REVISION, PACKAGE_VERSION | 795 global CLANG_REVISION, PACKAGE_VERSION |
| 791 if args.print_revision: | 796 if args.print_revision: |
| 792 if use_head_revision: | 797 if use_head_revision: |
| 793 print GetSvnRevision(LLVM_DIR) | 798 print GetSvnRevision(LLVM_DIR) |
| 794 else: | 799 else: |
| 795 print PACKAGE_VERSION | 800 print PACKAGE_VERSION |
| 796 return 0 | 801 return 0 |
| 797 | 802 |
| 798 if args.print_clang_version: | 803 if args.print_clang_version: |
| 799 sys.stdout.write(VERSION) | 804 sys.stdout.write(VERSION) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 813 args.force_local_build = True | 818 args.force_local_build = True |
| 814 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 819 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 815 # Only build the Android ASan rt on ToT bots when targetting Android. | 820 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 816 args.with_android = False | 821 args.with_android = False |
| 817 | 822 |
| 818 return UpdateClang(args) | 823 return UpdateClang(args) |
| 819 | 824 |
| 820 | 825 |
| 821 if __name__ == '__main__': | 826 if __name__ == '__main__': |
| 822 sys.exit(main()) | 827 sys.exit(main()) |
| OLD | NEW |