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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 os.chdir(COMPILER_RT_BUILD_DIR) | 679 os.chdir(COMPILER_RT_BUILD_DIR) |
680 # TODO(thakis): Add this once compiler-rt can build with clang-cl (see | 680 # TODO(thakis): Add this once compiler-rt can build with clang-cl (see |
681 # above). | 681 # above). |
682 #if args.bootstrap and sys.platform == 'win32': | 682 #if args.bootstrap and sys.platform == 'win32': |
683 # The bootstrap compiler produces 64-bit binaries by default. | 683 # The bootstrap compiler produces 64-bit binaries by default. |
684 #cflags += ['-m32'] | 684 #cflags += ['-m32'] |
685 #cxxflags += ['-m32'] | 685 #cxxflags += ['-m32'] |
686 compiler_rt_args = base_cmake_args + [ | 686 compiler_rt_args = base_cmake_args + [ |
687 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), | 687 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), |
688 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)] | 688 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)] |
| 689 if sys.platform == 'darwin': |
| 690 compiler_rt_args += ['-DCOMPILER_RT_ENABLE_IOS=ON'] |
689 if sys.platform != 'win32': | 691 if sys.platform != 'win32': |
690 compiler_rt_args += ['-DLLVM_CONFIG_PATH=' + | 692 compiler_rt_args += ['-DLLVM_CONFIG_PATH=' + |
691 os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'), | 693 os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'), |
692 '-DSANITIZER_MIN_OSX_VERSION="10.7"'] | 694 '-DSANITIZER_MIN_OSX_VERSION="10.7"'] |
693 # compiler-rt is part of the llvm checkout on Windows but a stand-alone | 695 # compiler-rt is part of the llvm checkout on Windows but a stand-alone |
694 # directory elsewhere, see the TODO above COMPILER_RT_DIR. | 696 # directory elsewhere, see the TODO above COMPILER_RT_DIR. |
695 RmCmakeCache('.') | 697 RmCmakeCache('.') |
696 RunCommand(['cmake'] + compiler_rt_args + | 698 RunCommand(['cmake'] + compiler_rt_args + |
697 [LLVM_DIR if sys.platform == 'win32' else COMPILER_RT_DIR], | 699 [LLVM_DIR if sys.platform == 'win32' else COMPILER_RT_DIR], |
698 msvc_arch='x86', env=deployment_env) | 700 msvc_arch='x86', env=deployment_env) |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 args.force_local_build = True | 900 args.force_local_build = True |
899 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 901 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
900 # Only build the Android ASan rt on ToT bots when targetting Android. | 902 # Only build the Android ASan rt on ToT bots when targetting Android. |
901 args.with_android = False | 903 args.with_android = False |
902 | 904 |
903 return UpdateClang(args) | 905 return UpdateClang(args) |
904 | 906 |
905 | 907 |
906 if __name__ == '__main__': | 908 if __name__ == '__main__': |
907 sys.exit(main()) | 909 sys.exit(main()) |
OLD | NEW |