Chromium Code Reviews| 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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 612 RmTree(LIBCXX_DIR) | 612 RmTree(LIBCXX_DIR) |
| 613 | 613 |
| 614 # Build clang. | 614 # Build clang. |
| 615 | 615 |
| 616 # If building at head, define a macro that plugins can use for #ifdefing | 616 # If building at head, define a macro that plugins can use for #ifdefing |
| 617 # out code that builds at head, but not at CLANG_REVISION or vice versa. | 617 # out code that builds at head, but not at CLANG_REVISION or vice versa. |
| 618 if use_head_revision: | 618 if use_head_revision: |
| 619 cflags += ['-DLLVM_FORCE_HEAD_REVISION'] | 619 cflags += ['-DLLVM_FORCE_HEAD_REVISION'] |
| 620 cxxflags += ['-DLLVM_FORCE_HEAD_REVISION'] | 620 cxxflags += ['-DLLVM_FORCE_HEAD_REVISION'] |
| 621 | 621 |
| 622 # Build PDBs for archieval on Windows. Don't use RelWithDebInfo since it | |
|
scottmg
2017/02/21 23:38:49
No 'e' in archival.
| |
| 623 # has different optimization defaults than Release. | |
| 624 if sys.platform == 'win32' and args.bootstrap: | |
| 625 cflags += ['/Zi'] | |
| 626 cxxflags += ['/Zi'] | |
| 627 ldflags += ['/DEBUG', '/OPT:REF', '/OPT:ICF'] | |
| 628 | |
| 622 CreateChromeToolsShim() | 629 CreateChromeToolsShim() |
| 623 | 630 |
| 624 deployment_env = None | 631 deployment_env = None |
| 625 if deployment_target: | 632 if deployment_target: |
| 626 deployment_env = os.environ.copy() | 633 deployment_env = os.environ.copy() |
| 627 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target | 634 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target |
| 628 | 635 |
| 629 cmake_args = [] | 636 cmake_args = [] |
| 630 # TODO(thakis): Unconditionally append this to base_cmake_args instead once | 637 # TODO(thakis): Unconditionally append this to base_cmake_args instead once |
| 631 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) | 638 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 911 args.force_local_build = True | 918 args.force_local_build = True |
| 912 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 919 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 913 # Only build the Android ASan rt on ToT bots when targetting Android. | 920 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 914 args.with_android = False | 921 args.with_android = False |
| 915 | 922 |
| 916 return UpdateClang(args) | 923 return UpdateClang(args) |
| 917 | 924 |
| 918 | 925 |
| 919 if __name__ == '__main__': | 926 if __name__ == '__main__': |
| 920 sys.exit(main()) | 927 sys.exit(main()) |
| OLD | NEW |