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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 def IsMac(): | 59 def IsMac(): |
60 return sys.platform == 'darwin' | 60 return sys.platform == 'darwin' |
61 | 61 |
62 | 62 |
63 @memoize() | 63 @memoize() |
64 def gyp_defines(): | 64 def gyp_defines(): |
65 """Parses and returns GYP_DEFINES env var as a dictionary.""" | 65 """Parses and returns GYP_DEFINES env var as a dictionary.""" |
66 return dict(arg.split('=', 1) | 66 return dict(arg.split('=', 1) |
67 for arg in shlex.split(os.environ.get('GYP_DEFINES', ''))) | 67 for arg in shlex.split(os.environ.get('GYP_DEFINES', ''))) |
68 | 68 |
| 69 @memoize() |
| 70 def gyp_msvs_version(): |
| 71 val = os.environ.get('GYP_MSVS_VERSION', '') |
| 72 return int(val) if val else None |
69 | 73 |
70 @memoize() | 74 @memoize() |
71 def distributor(): | 75 def distributor(): |
72 """ | 76 """ |
73 Returns a string which is the distributed build engine in use (if any). | 77 Returns a string which is the distributed build engine in use (if any). |
74 Possible values: 'goma', 'ib', '' | 78 Possible values: 'goma', 'ib', '' |
75 """ | 79 """ |
76 if 'goma' in gyp_defines(): | 80 if 'goma' in gyp_defines(): |
77 return 'goma' | 81 return 'goma' |
78 elif IsWindows(): | 82 elif IsWindows(): |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 builder() == 'ninja'): | 146 builder() == 'ninja'): |
143 add('Need to clobber winja goma due to backend cwd cache fix.') | 147 add('Need to clobber winja goma due to backend cwd cache fix.') |
144 if platform() == 'android': | 148 if platform() == 'android': |
145 add('Clobber: Resources removed in r195014 require clobber.') | 149 add('Clobber: Resources removed in r195014 require clobber.') |
146 if platform() == 'win' and builder() == 'ninja': | 150 if platform() == 'win' and builder() == 'ninja': |
147 add('Compile on cc_unittests fails due to symbols removed in r185063.') | 151 add('Compile on cc_unittests fails due to symbols removed in r185063.') |
148 if platform() == 'linux' and builder() == 'ninja': | 152 if platform() == 'linux' and builder() == 'ninja': |
149 add('Builders switching from make to ninja will clobber on this.') | 153 add('Builders switching from make to ninja will clobber on this.') |
150 if platform() == 'mac': | 154 if platform() == 'mac': |
151 add('Switching from bundle to unbundled dylib (issue 14743002).') | 155 add('Switching from bundle to unbundled dylib (issue 14743002).') |
| 156 if (platform() == 'win' and builder() == 'ninja' and |
| 157 gyp_msvs_version() == 2012 and |
| 158 gyp_defines().get('target_arch') == 'x64' and |
| 159 gyp_defines().get('dcheck_always_on') == '1'): |
| 160 add("Switched win x64 trybots from VS2010 to VS2012.") |
152 | 161 |
153 return landmines | 162 return landmines |
154 | 163 |
155 | 164 |
156 def get_target_build_dir(build_tool, target, is_iphone=False): | 165 def get_target_build_dir(build_tool, target, is_iphone=False): |
157 """ | 166 """ |
158 Returns output directory absolute path dependent on build and targets. | 167 Returns output directory absolute path dependent on build and targets. |
159 Examples: | 168 Examples: |
160 r'c:\b\build\slave\win\build\src\out\Release' | 169 r'c:\b\build\slave\win\build\src\out\Release' |
161 '/mnt/data/b/build/slave/linux/build/src/out/Debug' | 170 '/mnt/data/b/build/slave/linux/build/src/out/Debug' |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 gyp_helper.apply_chromium_gyp_env() | 235 gyp_helper.apply_chromium_gyp_env() |
227 | 236 |
228 for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'): | 237 for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'): |
229 set_up_landmines(target) | 238 set_up_landmines(target) |
230 | 239 |
231 return 0 | 240 return 0 |
232 | 241 |
233 | 242 |
234 if __name__ == '__main__': | 243 if __name__ == '__main__': |
235 sys.exit(main()) | 244 sys.exit(main()) |
OLD | NEW |