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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang') | 476 cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang') |
477 cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++') | 477 cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++') |
478 | 478 |
479 if args.gcc_toolchain: | 479 if args.gcc_toolchain: |
480 # Tell the bootstrap compiler to use a specific gcc prefix to search | 480 # Tell the bootstrap compiler to use a specific gcc prefix to search |
481 # for standard library headers and shared object files. | 481 # for standard library headers and shared object files. |
482 cflags = ['--gcc-toolchain=' + args.gcc_toolchain] | 482 cflags = ['--gcc-toolchain=' + args.gcc_toolchain] |
483 cxxflags = ['--gcc-toolchain=' + args.gcc_toolchain] | 483 cxxflags = ['--gcc-toolchain=' + args.gcc_toolchain] |
484 print 'Building final compiler' | 484 print 'Building final compiler' |
485 | 485 |
486 # TODO(thakis): Remove this after a few hours. | |
487 if os.path.exists(LLVM_BUILD_DIR): | |
488 RmTree(LLVM_BUILD_DIR) | |
489 | |
490 if sys.platform == 'darwin': | 486 if sys.platform == 'darwin': |
491 # Build libc++.dylib while some bots are still on OS X 10.6. | 487 # Build libc++.dylib while some bots are still on OS X 10.6. |
492 libcxxbuild = os.path.join(LLVM_BUILD_DIR, 'libcxxbuild') | 488 libcxxbuild = os.path.join(LLVM_BUILD_DIR, 'libcxxbuild') |
493 if os.path.isdir(libcxxbuild): | 489 if os.path.isdir(libcxxbuild): |
494 RmTree(libcxxbuild) | 490 RmTree(libcxxbuild) |
495 libcxxflags = ['-O3', '-std=c++11', '-fstrict-aliasing'] | 491 libcxxflags = ['-O3', '-std=c++11', '-fstrict-aliasing'] |
496 | 492 |
497 # libcxx and libcxxabi both have a file stdexcept.cpp, so put their .o files | 493 # libcxx and libcxxabi both have a file stdexcept.cpp, so put their .o files |
498 # into different subdirectories. | 494 # into different subdirectories. |
499 os.makedirs(os.path.join(libcxxbuild, 'libcxx')) | 495 os.makedirs(os.path.join(libcxxbuild, 'libcxx')) |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 args.force_local_build = True | 810 args.force_local_build = True |
815 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 811 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
816 # Only build the Android ASan rt on ToT bots when targetting Android. | 812 # Only build the Android ASan rt on ToT bots when targetting Android. |
817 args.with_android = False | 813 args.with_android = False |
818 | 814 |
819 return UpdateClang(args) | 815 return UpdateClang(args) |
820 | 816 |
821 | 817 |
822 if __name__ == '__main__': | 818 if __name__ == '__main__': |
823 sys.exit(main()) | 819 sys.exit(main()) |
OLD | NEW |