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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 # clang previously downloaded, keep it up to date. | 847 # clang previously downloaded, keep it up to date. |
848 # If you don't want this, delete third_party/llvm-build on your machine. | 848 # If you don't want this, delete third_party/llvm-build on your machine. |
849 if os.path.isdir(LLVM_BUILD_DIR): | 849 if os.path.isdir(LLVM_BUILD_DIR): |
850 is_clang_required = True | 850 is_clang_required = True |
851 if not is_clang_required: | 851 if not is_clang_required: |
852 return 0 | 852 return 0 |
853 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): | 853 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): |
854 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' | 854 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' |
855 return 0 | 855 return 0 |
856 | 856 |
| 857 if use_head_revision: |
| 858 # TODO(hans): Remove after the next roll. |
| 859 global VERSION |
| 860 VERSION = '4.0.0' |
| 861 |
857 global CLANG_REVISION, PACKAGE_VERSION | 862 global CLANG_REVISION, PACKAGE_VERSION |
858 if args.print_revision: | 863 if args.print_revision: |
859 if use_head_revision or args.llvm_force_head_revision: | 864 if use_head_revision or args.llvm_force_head_revision: |
860 print GetSvnRevision(LLVM_DIR) | 865 print GetSvnRevision(LLVM_DIR) |
861 else: | 866 else: |
862 print PACKAGE_VERSION | 867 print PACKAGE_VERSION |
863 return 0 | 868 return 0 |
864 | 869 |
865 if args.print_clang_version: | 870 if args.print_clang_version: |
866 sys.stdout.write(VERSION) | 871 sys.stdout.write(VERSION) |
(...skipping 13 matching lines...) Expand all Loading... |
880 args.force_local_build = True | 885 args.force_local_build = True |
881 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 886 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
882 # Only build the Android ASan rt on ToT bots when targetting Android. | 887 # Only build the Android ASan rt on ToT bots when targetting Android. |
883 args.with_android = False | 888 args.with_android = False |
884 | 889 |
885 return UpdateClang(args) | 890 return UpdateClang(args) |
886 | 891 |
887 | 892 |
888 if __name__ == '__main__': | 893 if __name__ == '__main__': |
889 sys.exit(main()) | 894 sys.exit(main()) |
OLD | NEW |