Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Side by Side Diff: tools/clang/scripts/update.py

Issue 2336463003: clang build script: Clobber old Android toolchains. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 if args.with_android: 755 if args.with_android:
756 make_toolchain = os.path.join( 756 make_toolchain = os.path.join(
757 ANDROID_NDK_DIR, 'build', 'tools', 'make_standalone_toolchain.py') 757 ANDROID_NDK_DIR, 'build', 'tools', 'make_standalone_toolchain.py')
758 for target_arch in ['aarch64', 'arm', 'i686']: 758 for target_arch in ['aarch64', 'arm', 'i686']:
759 # Make standalone Android toolchain for target_arch. 759 # Make standalone Android toolchain for target_arch.
760 toolchain_dir = os.path.join( 760 toolchain_dir = os.path.join(
761 LLVM_BUILD_DIR, 'android-toolchain-' + target_arch) 761 LLVM_BUILD_DIR, 'android-toolchain-' + target_arch)
762 RunCommand([ 762 RunCommand([
763 make_toolchain, 763 make_toolchain,
764 '--api=' + ('21' if target_arch == 'aarch64' else '19'), 764 '--api=' + ('21' if target_arch == 'aarch64' else '19'),
765 '--force',
765 '--install-dir=%s' % toolchain_dir, 766 '--install-dir=%s' % toolchain_dir,
766 '--stl=stlport', 767 '--stl=stlport',
767 '--arch=' + { 768 '--arch=' + {
768 'aarch64': 'arm64', 769 'aarch64': 'arm64',
769 'arm': 'arm', 770 'arm': 'arm',
770 'i686': 'x86', 771 'i686': 'x86',
771 }[target_arch]]) 772 }[target_arch]])
772 # Android NDK r9d copies a broken unwind.h into the toolchain, see 773 # Android NDK r9d copies a broken unwind.h into the toolchain, see
773 # http://crbug.com/357890 774 # http://crbug.com/357890
774 for f in glob.glob(os.path.join(toolchain_dir, 'include/c++/*/unwind.h')): 775 for f in glob.glob(os.path.join(toolchain_dir, 'include/c++/*/unwind.h')):
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 args.force_local_build = True 898 args.force_local_build = True
898 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): 899 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''):
899 # Only build the Android ASan rt on ToT bots when targetting Android. 900 # Only build the Android ASan rt on ToT bots when targetting Android.
900 args.with_android = False 901 args.with_android = False
901 902
902 return UpdateClang(args) 903 return UpdateClang(args)
903 904
904 905
905 if __name__ == '__main__': 906 if __name__ == '__main__':
906 sys.exit(main()) 907 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698