| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 DownloadHostGcc(args) | 451 DownloadHostGcc(args) |
| 452 AddSvnToPathOnWin() | 452 AddSvnToPathOnWin() |
| 453 AddCMakeToPath() | 453 AddCMakeToPath() |
| 454 AddGnuWinToPath() | 454 AddGnuWinToPath() |
| 455 | 455 |
| 456 DeleteChromeToolsShim() | 456 DeleteChromeToolsShim() |
| 457 | 457 |
| 458 Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) | 458 Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) |
| 459 Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR) | 459 Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR) |
| 460 if sys.platform == 'win32' or use_head_revision: | 460 if sys.platform != 'darwin': |
| 461 Checkout('LLD', LLVM_REPO_URL + '/lld/trunk', LLD_DIR) | 461 Checkout('LLD', LLVM_REPO_URL + '/lld/trunk', LLD_DIR) |
| 462 elif os.path.exists(LLD_DIR): | 462 elif os.path.exists(LLD_DIR): |
| 463 # In case someone sends a tryjob that temporary adds lld to the checkout, | 463 # In case someone sends a tryjob that temporary adds lld to the checkout, |
| 464 # make sure it's not around on future builds. | 464 # make sure it's not around on future builds. |
| 465 RmTree(LLD_DIR) | 465 RmTree(LLD_DIR) |
| 466 Checkout('compiler-rt', LLVM_REPO_URL + '/compiler-rt/trunk', COMPILER_RT_DIR) | 466 Checkout('compiler-rt', LLVM_REPO_URL + '/compiler-rt/trunk', COMPILER_RT_DIR) |
| 467 if sys.platform == 'darwin': | 467 if sys.platform == 'darwin': |
| 468 # clang needs a libc++ checkout, else -stdlib=libc++ won't find includes | 468 # clang needs a libc++ checkout, else -stdlib=libc++ won't find includes |
| 469 # (i.e. this is needed for bootstrap builds). | 469 # (i.e. this is needed for bootstrap builds). |
| 470 Checkout('libcxx', LLVM_REPO_URL + '/libcxx/trunk', LIBCXX_DIR) | 470 Checkout('libcxx', LLVM_REPO_URL + '/libcxx/trunk', LIBCXX_DIR) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 490 [cxx, '-print-file-name=libstdc++.so.6']).rstrip() | 490 [cxx, '-print-file-name=libstdc++.so.6']).rstrip() |
| 491 os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp) | 491 os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp) |
| 492 | 492 |
| 493 cflags = [] | 493 cflags = [] |
| 494 cxxflags = [] | 494 cxxflags = [] |
| 495 ldflags = [] | 495 ldflags = [] |
| 496 | 496 |
| 497 base_cmake_args = ['-GNinja', | 497 base_cmake_args = ['-GNinja', |
| 498 '-DCMAKE_BUILD_TYPE=Release', | 498 '-DCMAKE_BUILD_TYPE=Release', |
| 499 '-DLLVM_ENABLE_ASSERTIONS=ON', | 499 '-DLLVM_ENABLE_ASSERTIONS=ON', |
| 500 '-DLLVM_ENABLE_THREADS=OFF', | |
| 501 # Statically link MSVCRT to avoid DLL dependencies. | 500 # Statically link MSVCRT to avoid DLL dependencies. |
| 502 '-DLLVM_USE_CRT_RELEASE=MT', | 501 '-DLLVM_USE_CRT_RELEASE=MT', |
| 503 ] | 502 ] |
| 504 | 503 |
| 505 binutils_incdir = '' | 504 binutils_incdir = '' |
| 506 if sys.platform.startswith('linux'): | 505 if sys.platform.startswith('linux'): |
| 507 binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include') | 506 binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include') |
| 508 | 507 |
| 509 if args.bootstrap: | 508 if args.bootstrap: |
| 510 print 'Building bootstrap compiler' | 509 print 'Building bootstrap compiler' |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 EnsureDirExists(LLVM_LTO_GOLD_PLUGIN_DIR) | 558 EnsureDirExists(LLVM_LTO_GOLD_PLUGIN_DIR) |
| 560 os.chdir(LLVM_LTO_GOLD_PLUGIN_DIR) | 559 os.chdir(LLVM_LTO_GOLD_PLUGIN_DIR) |
| 561 | 560 |
| 562 # Create a symlink to LLVMgold.so build in the previous step so that ar | 561 # Create a symlink to LLVMgold.so build in the previous step so that ar |
| 563 # and ranlib could find it while linking LLVMgold.so with LTO. | 562 # and ranlib could find it while linking LLVMgold.so with LTO. |
| 564 EnsureDirExists(BFD_PLUGINS_DIR) | 563 EnsureDirExists(BFD_PLUGINS_DIR) |
| 565 RunCommand(['ln', '-sf', | 564 RunCommand(['ln', '-sf', |
| 566 os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'lib', 'LLVMgold.so'), | 565 os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'lib', 'LLVMgold.so'), |
| 567 os.path.join(BFD_PLUGINS_DIR, 'LLVMgold.so')]) | 566 os.path.join(BFD_PLUGINS_DIR, 'LLVMgold.so')]) |
| 568 | 567 |
| 569 lto_cflags = ['-flto'] | 568 lto_cflags = ['-flto=thin'] |
| 570 lto_ldflags = ['-fuse-ld=gold'] | 569 lto_ldflags = ['-fuse-ld=lld'] |
| 571 if args.gcc_toolchain: | 570 if args.gcc_toolchain: |
| 572 # Tell the bootstrap compiler to use a specific gcc prefix to search | 571 # Tell the bootstrap compiler to use a specific gcc prefix to search |
| 573 # for standard library headers and shared object files. | 572 # for standard library headers and shared object files. |
| 574 lto_cflags += ['--gcc-toolchain=' + args.gcc_toolchain] | 573 lto_cflags += ['--gcc-toolchain=' + args.gcc_toolchain] |
| 575 lto_cmake_args = base_cmake_args + [ | 574 lto_cmake_args = base_cmake_args + [ |
| 576 '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, | 575 '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, |
| 577 '-DCMAKE_C_COMPILER=' + cc, | 576 '-DCMAKE_C_COMPILER=' + cc, |
| 578 '-DCMAKE_CXX_COMPILER=' + cxx, | 577 '-DCMAKE_CXX_COMPILER=' + cxx, |
| 579 '-DCMAKE_C_FLAGS=' + ' '.join(lto_cflags), | 578 '-DCMAKE_C_FLAGS=' + ' '.join(lto_cflags), |
| 580 '-DCMAKE_CXX_FLAGS=' + ' '.join(lto_cflags), | 579 '-DCMAKE_CXX_FLAGS=' + ' '.join(lto_cflags), |
| 581 '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(lto_ldflags), | 580 '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(lto_ldflags), |
| 582 '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(lto_ldflags), | 581 '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(lto_ldflags), |
| 583 '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(lto_ldflags)] | 582 '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(lto_ldflags)] |
| 584 | 583 |
| 585 # We need to use the proper binutils which support LLVM Gold plugin. | 584 # We need to use the proper binutils which support LLVM Gold plugin. |
| 586 lto_env = os.environ.copy() | 585 lto_env = os.environ.copy() |
| 587 lto_env['PATH'] = BINUTILS_BIN_DIR + os.pathsep + lto_env.get('PATH', '') | 586 lto_env['PATH'] = BINUTILS_BIN_DIR + os.pathsep + lto_env.get('PATH', '') |
| 588 | 587 |
| 589 RmCmakeCache('.') | 588 RmCmakeCache('.') |
| 590 RunCommand(['cmake'] + lto_cmake_args + [LLVM_DIR], env=lto_env) | 589 RunCommand(['cmake'] + lto_cmake_args + [LLVM_DIR], env=lto_env) |
| 591 RunCommand(['ninja', 'LLVMgold'], env=lto_env) | 590 RunCommand(['ninja', 'LLVMgold', 'lld'], env=lto_env) |
| 592 | 591 |
| 593 | 592 |
| 594 # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is | 593 # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is |
| 595 # needed, on OS X it requires libc++. clang only automatically links to libc++ | 594 # needed, on OS X it requires libc++. clang only automatically links to libc++ |
| 596 # when targeting OS X 10.9+, so add stdlib=libc++ explicitly so clang can run | 595 # when targeting OS X 10.9+, so add stdlib=libc++ explicitly so clang can run |
| 597 # on OS X versions as old as 10.7. | 596 # on OS X versions as old as 10.7. |
| 598 deployment_target = '' | 597 deployment_target = '' |
| 599 | 598 |
| 600 if sys.platform == 'darwin' and args.bootstrap: | 599 if sys.platform == 'darwin' and args.bootstrap: |
| 601 # When building on 10.9, /usr/include usually doesn't exist, and while | 600 # When building on 10.9, /usr/include usually doesn't exist, and while |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target | 632 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target |
| 634 | 633 |
| 635 cmake_args = [] | 634 cmake_args = [] |
| 636 # TODO(thakis): Unconditionally append this to base_cmake_args instead once | 635 # TODO(thakis): Unconditionally append this to base_cmake_args instead once |
| 637 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) | 636 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) |
| 638 cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args | 637 cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args |
| 639 if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc) | 638 if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc) |
| 640 if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) | 639 if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) |
| 641 chrome_tools = list(set(['plugins', 'blink_gc_plugin'] + args.extra_tools)) | 640 chrome_tools = list(set(['plugins', 'blink_gc_plugin'] + args.extra_tools)) |
| 642 cmake_args += base_cmake_args + [ | 641 cmake_args += base_cmake_args + [ |
| 642 '-DLLVM_ENABLE_THREADS=OFF', |
| 643 '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, | 643 '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, |
| 644 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), | 644 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), |
| 645 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags), | 645 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags), |
| 646 '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags), | 646 '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags), |
| 647 '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags), | 647 '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags), |
| 648 '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags), | 648 '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags), |
| 649 '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR, | 649 '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR, |
| 650 # TODO(thakis): Remove this once official builds pass -Wl,--build-id | 650 # TODO(thakis): Remove this once official builds pass -Wl,--build-id |
| 651 # explicitly, https://crbug.com/622775 | 651 # explicitly, https://crbug.com/622775 |
| 652 '-DENABLE_LINKER_BUILD_ID=ON', | 652 '-DENABLE_LINKER_BUILD_ID=ON', |
| 653 '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'), | 653 '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'), |
| 654 '-DCHROMIUM_TOOLS=%s' % ';'.join(chrome_tools)] | 654 '-DCHROMIUM_TOOLS=%s' % ';'.join(chrome_tools)] |
| 655 | 655 |
| 656 EnsureDirExists(LLVM_BUILD_DIR) | 656 EnsureDirExists(LLVM_BUILD_DIR) |
| 657 os.chdir(LLVM_BUILD_DIR) | 657 os.chdir(LLVM_BUILD_DIR) |
| 658 RmCmakeCache('.') | 658 RmCmakeCache('.') |
| 659 RunCommand(['cmake'] + cmake_args + [LLVM_DIR], | 659 RunCommand(['cmake'] + cmake_args + [LLVM_DIR], |
| 660 msvc_arch='x64', env=deployment_env) | 660 msvc_arch='x64', env=deployment_env) |
| 661 | 661 |
| 662 if args.gcc_toolchain: | 662 if args.gcc_toolchain: |
| 663 # Copy in the right stdlibc++.so.6 so clang can start. | 663 # Copy in the right stdlibc++.so.6 so clang can start. |
| 664 if not os.path.exists(os.path.join(LLVM_BUILD_DIR, 'lib')): | 664 if not os.path.exists(os.path.join(LLVM_BUILD_DIR, 'lib')): |
| 665 os.mkdir(os.path.join(LLVM_BUILD_DIR, 'lib')) | 665 os.mkdir(os.path.join(LLVM_BUILD_DIR, 'lib')) |
| 666 libstdcpp = subprocess.check_output( | 666 libstdcpp = subprocess.check_output( |
| 667 [cxx] + cxxflags + ['-print-file-name=libstdc++.so.6']).rstrip() | 667 [cxx] + cxxflags + ['-print-file-name=libstdc++.so.6']).rstrip() |
| 668 CopyFile(libstdcpp, os.path.join(LLVM_BUILD_DIR, 'lib')) | 668 CopyFile(libstdcpp, os.path.join(LLVM_BUILD_DIR, 'lib')) |
| 669 | 669 |
| 670 RunCommand(['ninja'], msvc_arch='x64') | 670 RunCommand(['ninja'], msvc_arch='x64') |
| 671 | 671 |
| 672 # Copy LTO-optimized lld, if any. |
| 673 if args.bootstrap and args.lto_gold_plugin: |
| 674 CopyFile(os.path.join(LLVM_LTO_GOLD_PLUGIN_DIR, 'bin', 'lld'), |
| 675 os.path.join(LLVM_BUILD_DIR, 'bin')) |
| 676 |
| 672 if chrome_tools: | 677 if chrome_tools: |
| 673 # If any Chromium tools were built, install those now. | 678 # If any Chromium tools were built, install those now. |
| 674 RunCommand(['ninja', 'cr-install'], msvc_arch='x64') | 679 RunCommand(['ninja', 'cr-install'], msvc_arch='x64') |
| 675 | 680 |
| 676 if sys.platform == 'darwin': | 681 if sys.platform == 'darwin': |
| 677 # See http://crbug.com/256342 | 682 # See http://crbug.com/256342 |
| 678 RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) | 683 RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) |
| 679 elif sys.platform.startswith('linux'): | 684 elif sys.platform.startswith('linux'): |
| 680 RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) | 685 RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')]) |
| 681 | 686 |
| 682 VeryifyVersionOfBuiltClangMatchesVERSION() | 687 VeryifyVersionOfBuiltClangMatchesVERSION() |
| 683 | 688 |
| 684 # Do an out-of-tree build of compiler-rt. | 689 # Do an out-of-tree build of compiler-rt. |
| 685 # On Windows, this is used to get the 32-bit ASan run-time. | 690 # On Windows, this is used to get the 32-bit ASan run-time. |
| 686 # TODO(hans): Remove once the regular build above produces this. | 691 # TODO(hans): Remove once the regular build above produces this. |
| 687 # On Mac and Linux, this is used to get the regular 64-bit run-time. | 692 # On Mac and Linux, this is used to get the regular 64-bit run-time. |
| 688 # Do a clobbered build due to cmake changes. | 693 # Do a clobbered build due to cmake changes. |
| 689 if os.path.isdir(COMPILER_RT_BUILD_DIR): | 694 if os.path.isdir(COMPILER_RT_BUILD_DIR): |
| 690 RmTree(COMPILER_RT_BUILD_DIR) | 695 RmTree(COMPILER_RT_BUILD_DIR) |
| 691 os.makedirs(COMPILER_RT_BUILD_DIR) | 696 os.makedirs(COMPILER_RT_BUILD_DIR) |
| 692 os.chdir(COMPILER_RT_BUILD_DIR) | 697 os.chdir(COMPILER_RT_BUILD_DIR) |
| 693 # TODO(thakis): Add this once compiler-rt can build with clang-cl (see | 698 # TODO(thakis): Add this once compiler-rt can build with clang-cl (see |
| 694 # above). | 699 # above). |
| 695 #if args.bootstrap and sys.platform == 'win32': | 700 #if args.bootstrap and sys.platform == 'win32': |
| 696 # The bootstrap compiler produces 64-bit binaries by default. | 701 # The bootstrap compiler produces 64-bit binaries by default. |
| 697 #cflags += ['-m32'] | 702 #cflags += ['-m32'] |
| 698 #cxxflags += ['-m32'] | 703 #cxxflags += ['-m32'] |
| 699 compiler_rt_args = base_cmake_args + [ | 704 compiler_rt_args = base_cmake_args + [ |
| 705 '-DLLVM_ENABLE_THREADS=OFF', |
| 700 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), | 706 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), |
| 701 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)] | 707 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)] |
| 702 if sys.platform == 'darwin': | 708 if sys.platform == 'darwin': |
| 703 compiler_rt_args += ['-DCOMPILER_RT_ENABLE_IOS=ON'] | 709 compiler_rt_args += ['-DCOMPILER_RT_ENABLE_IOS=ON'] |
| 704 if sys.platform != 'win32': | 710 if sys.platform != 'win32': |
| 705 compiler_rt_args += ['-DLLVM_CONFIG_PATH=' + | 711 compiler_rt_args += ['-DLLVM_CONFIG_PATH=' + |
| 706 os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'), | 712 os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'), |
| 707 '-DSANITIZER_MIN_OSX_VERSION="10.7"'] | 713 '-DSANITIZER_MIN_OSX_VERSION="10.7"'] |
| 708 # compiler-rt is part of the llvm checkout on Windows but a stand-alone | 714 # compiler-rt is part of the llvm checkout on Windows but a stand-alone |
| 709 # directory elsewhere, see the TODO above COMPILER_RT_DIR. | 715 # directory elsewhere, see the TODO above COMPILER_RT_DIR. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 | 798 |
| 793 # Build ASan runtime for Android in a separate build tree. | 799 # Build ASan runtime for Android in a separate build tree. |
| 794 build_dir = os.path.join(LLVM_BUILD_DIR, 'android-' + target_arch) | 800 build_dir = os.path.join(LLVM_BUILD_DIR, 'android-' + target_arch) |
| 795 if not os.path.exists(build_dir): | 801 if not os.path.exists(build_dir): |
| 796 os.mkdir(os.path.join(build_dir)) | 802 os.mkdir(os.path.join(build_dir)) |
| 797 os.chdir(build_dir) | 803 os.chdir(build_dir) |
| 798 cflags = ['--target=%s-linux-androideabi' % target_arch, | 804 cflags = ['--target=%s-linux-androideabi' % target_arch, |
| 799 '--sysroot=%s/sysroot' % toolchain_dir, | 805 '--sysroot=%s/sysroot' % toolchain_dir, |
| 800 '-B%s' % toolchain_dir] | 806 '-B%s' % toolchain_dir] |
| 801 android_args = base_cmake_args + [ | 807 android_args = base_cmake_args + [ |
| 808 '-DLLVM_ENABLE_THREADS=OFF', |
| 802 '-DCMAKE_C_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang'), | 809 '-DCMAKE_C_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang'), |
| 803 '-DCMAKE_CXX_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang++'), | 810 '-DCMAKE_CXX_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang++'), |
| 804 '-DLLVM_CONFIG_PATH=' + os.path.join(LLVM_BUILD_DIR, 'bin/llvm-config'), | 811 '-DLLVM_CONFIG_PATH=' + os.path.join(LLVM_BUILD_DIR, 'bin/llvm-config'), |
| 805 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), | 812 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), |
| 806 '-DCMAKE_CXX_FLAGS=' + ' '.join(cflags), | 813 '-DCMAKE_CXX_FLAGS=' + ' '.join(cflags), |
| 807 '-DANDROID=1'] | 814 '-DANDROID=1'] |
| 808 RmCmakeCache('.') | 815 RmCmakeCache('.') |
| 809 RunCommand(['cmake'] + android_args + [COMPILER_RT_DIR]) | 816 RunCommand(['cmake'] + android_args + [COMPILER_RT_DIR]) |
| 810 RunCommand(['ninja', 'libclang_rt.asan-%s-android.so' % target_arch]) | 817 RunCommand(['ninja', 'libclang_rt.asan-%s-android.so' % target_arch]) |
| 811 | 818 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 args.force_local_build = True | 906 args.force_local_build = True |
| 900 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 907 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 901 # Only build the Android ASan rt on ToT bots when targetting Android. | 908 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 902 args.with_android = False | 909 args.with_android = False |
| 903 | 910 |
| 904 return UpdateClang(args) | 911 return UpdateClang(args) |
| 905 | 912 |
| 906 | 913 |
| 907 if __name__ == '__main__': | 914 if __name__ == '__main__': |
| 908 sys.exit(main()) | 915 sys.exit(main()) |
| OLD | NEW |