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 """ | 6 """ |
7 This file holds a list of reasons why a particular build needs to be clobbered | 7 This file holds a list of reasons why a particular build needs to be clobbered |
8 (or a list of 'landmines'). | 8 (or a list of 'landmines'). |
9 | 9 |
10 This script runs every build as a hook. If it detects that the build should | 10 This script runs every build as a hook. If it detects that the build should |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 target + ('-iphoneos' if is_iphone else '')) | 161 target + ('-iphoneos' if is_iphone else '')) |
162 elif build_tool == 'make': | 162 elif build_tool == 'make': |
163 ret = os.path.join(SRC_DIR, 'out', target) | 163 ret = os.path.join(SRC_DIR, 'out', target) |
164 elif build_tool == 'ninja': | 164 elif build_tool == 'ninja': |
165 ret = os.path.join(SRC_DIR, 'out', target) | 165 ret = os.path.join(SRC_DIR, 'out', target) |
166 elif build_tool in ['msvs', 'vs', 'ib']: | 166 elif build_tool in ['msvs', 'vs', 'ib']: |
167 ret = os.path.join(SRC_DIR, 'build', target) | 167 ret = os.path.join(SRC_DIR, 'build', target) |
168 elif build_tool == 'scons': | 168 elif build_tool == 'scons': |
169 ret = os.path.join(SRC_DIR, 'sconsbuild', target) | 169 ret = os.path.join(SRC_DIR, 'sconsbuild', target) |
170 else: | 170 else: |
171 raise NotImplementedError() | 171 raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool) |
172 return os.path.abspath(ret) | 172 return os.path.abspath(ret) |
173 | 173 |
174 | 174 |
175 def set_up_landmines(target): | 175 def set_up_landmines(target): |
176 """Does the work of setting, planting, and triggering landmines.""" | 176 """Does the work of setting, planting, and triggering landmines.""" |
177 out_dir = get_target_build_dir(builder(), target, platform() == 'ios') | 177 out_dir = get_target_build_dir(builder(), target, platform() == 'ios') |
178 | 178 |
179 landmines_path = os.path.join(out_dir, '.landmines') | 179 landmines_path = os.path.join(out_dir, '.landmines') |
180 if not os.path.exists(out_dir): | 180 if not os.path.exists(out_dir): |
181 os.makedirs(out_dir) | 181 os.makedirs(out_dir) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 gyp_helper.apply_chromium_gyp_env() | 220 gyp_helper.apply_chromium_gyp_env() |
221 | 221 |
222 for target in ('Debug', 'Release'): | 222 for target in ('Debug', 'Release'): |
223 set_up_landmines(target) | 223 set_up_landmines(target) |
224 | 224 |
225 return 0 | 225 return 0 |
226 | 226 |
227 | 227 |
228 if __name__ == '__main__': | 228 if __name__ == '__main__': |
229 sys.exit(main()) | 229 sys.exit(main()) |
OLD | NEW |