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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 # clang previously downloaded, keep it up to date. | 873 # clang previously downloaded, keep it up to date. |
874 # If you don't want this, delete third_party/llvm-build on your machine. | 874 # If you don't want this, delete third_party/llvm-build on your machine. |
875 if os.path.isdir(LLVM_BUILD_DIR): | 875 if os.path.isdir(LLVM_BUILD_DIR): |
876 is_clang_required = True | 876 is_clang_required = True |
877 if not is_clang_required: | 877 if not is_clang_required: |
878 return 0 | 878 return 0 |
879 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): | 879 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): |
880 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' | 880 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' |
881 return 0 | 881 return 0 |
882 | 882 |
| 883 if use_head_revision: |
| 884 # TODO(hans): Trunk was updated; remove after the next roll. |
| 885 global VERSION |
| 886 VERSION = '5.0.0' |
| 887 |
883 global CLANG_REVISION, PACKAGE_VERSION | 888 global CLANG_REVISION, PACKAGE_VERSION |
884 if args.print_revision: | 889 if args.print_revision: |
885 if use_head_revision or args.llvm_force_head_revision: | 890 if use_head_revision or args.llvm_force_head_revision: |
886 print GetSvnRevision(LLVM_DIR) | 891 print GetSvnRevision(LLVM_DIR) |
887 else: | 892 else: |
888 print PACKAGE_VERSION | 893 print PACKAGE_VERSION |
889 return 0 | 894 return 0 |
890 | 895 |
891 if args.print_clang_version: | 896 if args.print_clang_version: |
892 sys.stdout.write(VERSION) | 897 sys.stdout.write(VERSION) |
(...skipping 13 matching lines...) Expand all Loading... |
906 args.force_local_build = True | 911 args.force_local_build = True |
907 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 912 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
908 # Only build the Android ASan rt on ToT bots when targetting Android. | 913 # Only build the Android ASan rt on ToT bots when targetting Android. |
909 args.with_android = False | 914 args.with_android = False |
910 | 915 |
911 return UpdateClang(args) | 916 return UpdateClang(args) |
912 | 917 |
913 | 918 |
914 if __name__ == '__main__': | 919 if __name__ == '__main__': |
915 sys.exit(main()) | 920 sys.exit(main()) |
OLD | NEW |