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 """A tool to build chrome, executed by buildbot. | 6 """A tool to build chrome, executed by buildbot. |
7 | 7 |
8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
10 | 10 |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 help='build mode (dev or official) controlling ' | 1136 help='build mode (dev or official) controlling ' |
1137 'environment variables set during build') | 1137 'environment variables set during build') |
1138 option_parser.add_option('--build-tool', default=None, | 1138 option_parser.add_option('--build-tool', default=None, |
1139 help='specify build tool (ib, vs, xcode)') | 1139 help='specify build tool (ib, vs, xcode)') |
1140 option_parser.add_option('--build-args', action='append', default=[], | 1140 option_parser.add_option('--build-args', action='append', default=[], |
1141 help='arguments to pass to the build tool') | 1141 help='arguments to pass to the build tool') |
1142 option_parser.add_option('--compiler', default=None, | 1142 option_parser.add_option('--compiler', default=None, |
1143 help='specify alternative compiler (e.g. clang)') | 1143 help='specify alternative compiler (e.g. clang)') |
1144 if chromium_utils.IsWindows(): | 1144 if chromium_utils.IsWindows(): |
1145 # Windows only. | 1145 # Windows only. |
1146 option_parser.add_option('', '--no-ib', action='store_true', default=False, | 1146 option_parser.add_option('--no-ib', action='store_true', default=False, |
1147 help='use Visual Studio instead of IncrediBuild') | 1147 help='use Visual Studio instead of IncrediBuild') |
1148 option_parser.add_option('', '--msvs_version', | 1148 option_parser.add_option('--msvs_version', |
1149 help='VisualStudio version to use') | 1149 help='VisualStudio version to use') |
1150 # For linux to arm cross compile. | 1150 # For linux to arm cross compile. |
1151 option_parser.add_option('', '--crosstool', default=None, | 1151 option_parser.add_option('--crosstool', default=None, |
1152 help='optional path to crosstool toolset') | 1152 help='optional path to crosstool toolset') |
1153 option_parser.add_option('', '--llvm-tsan', action='store_true', | 1153 option_parser.add_option('--llvm-tsan', action='store_true', |
1154 default=False, | 1154 default=False, |
1155 help='build with LLVM\'s ThreadSanitizer') | 1155 help='build with LLVM\'s ThreadSanitizer') |
1156 if chromium_utils.IsMac(): | 1156 if chromium_utils.IsMac(): |
1157 # Mac only. | 1157 # Mac only. |
1158 option_parser.add_option('', '--xcode-target', default=None, | 1158 option_parser.add_option('--xcode-target', default=None, |
1159 help='Target from the xcodeproj file') | 1159 help='Target from the xcodeproj file') |
1160 option_parser.add_option('', '--goma-dir', | 1160 option_parser.add_option('--goma-dir', |
1161 default=os.path.join(BUILD_DIR, 'goma'), | 1161 default=os.path.join(BUILD_DIR, 'goma'), |
1162 help='specify goma directory') | 1162 help='specify goma directory') |
1163 option_parser.add_option('--verbose', action='store_true') | 1163 option_parser.add_option('--verbose', action='store_true') |
1164 | 1164 |
1165 options, args = option_parser.parse_args() | 1165 options, args = option_parser.parse_args() |
1166 | 1166 |
1167 if not options.src_dir: | 1167 if not options.src_dir: |
1168 options.src_dir = 'src' | 1168 options.src_dir = 'src' |
1169 options.src_dir = os.path.abspath(options.src_dir) | 1169 options.src_dir = os.path.abspath(options.src_dir) |
1170 | 1170 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 options.target_output_dir = get_target_build_dir(options.build_tool, | 1235 options.target_output_dir = get_target_build_dir(options.build_tool, |
1236 options.src_dir, options.target, 'iphoneos' in args) | 1236 options.src_dir, options.target, 'iphoneos' in args) |
1237 options.clobber = (options.clobber or | 1237 options.clobber = (options.clobber or |
1238 landmines_triggered(options.target_output_dir)) | 1238 landmines_triggered(options.target_output_dir)) |
1239 | 1239 |
1240 return main(options, args) | 1240 return main(options, args) |
1241 | 1241 |
1242 | 1242 |
1243 if '__main__' == __name__: | 1243 if '__main__' == __name__: |
1244 sys.exit(real_main()) | 1244 sys.exit(real_main()) |
OLD | NEW |