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 """ | 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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() | 69 @memoize() |
| 70 def gyp_msvs_version(): | 70 def gyp_msvs_version(): |
| 71 val = os.environ.get('GYP_MSVS_VERSION', '') | 71 return os.environ.get('GYP_MSVS_VERSION', '') |
| 72 return int(val) if val else None | |
| 73 | 72 |
| 74 @memoize() | 73 @memoize() |
| 75 def distributor(): | 74 def distributor(): |
| 76 """ | 75 """ |
| 77 Returns a string which is the distributed build engine in use (if any). | 76 Returns a string which is the distributed build engine in use (if any). |
| 78 Possible values: 'goma', 'ib', '' | 77 Possible values: 'goma', 'ib', '' |
| 79 """ | 78 """ |
| 80 if 'goma' in gyp_defines(): | 79 if 'goma' in gyp_defines(): |
| 81 return 'goma' | 80 return 'goma' |
| 82 elif IsWindows(): | 81 elif IsWindows(): |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 add('Need to clobber winja goma due to backend cwd cache fix.') | 146 add('Need to clobber winja goma due to backend cwd cache fix.') |
| 148 if platform() == 'android': | 147 if platform() == 'android': |
| 149 add('Clobber: Resources removed in r195014 require clobber.') | 148 add('Clobber: Resources removed in r195014 require clobber.') |
| 150 if platform() == 'win' and builder() == 'ninja': | 149 if platform() == 'win' and builder() == 'ninja': |
| 151 add('Compile on cc_unittests fails due to symbols removed in r185063.') | 150 add('Compile on cc_unittests fails due to symbols removed in r185063.') |
| 152 if platform() == 'linux' and builder() == 'ninja': | 151 if platform() == 'linux' and builder() == 'ninja': |
| 153 add('Builders switching from make to ninja will clobber on this.') | 152 add('Builders switching from make to ninja will clobber on this.') |
| 154 if platform() == 'mac': | 153 if platform() == 'mac': |
| 155 add('Switching from bundle to unbundled dylib (issue 14743002).') | 154 add('Switching from bundle to unbundled dylib (issue 14743002).') |
| 156 if (platform() == 'win' and builder() == 'ninja' and | 155 if (platform() == 'win' and builder() == 'ninja' and |
| 157 gyp_msvs_version() == 2012 and | 156 gyp_msvs_version() == '2012' and |
|
scottmg
2013/06/13 18:28:57
this should be gyp_msvs_version() in ('2012', '201
robliao
2013/06/13 19:37:49
Propagating iannucci's comment: Could be, but we r
| |
| 158 gyp_defines().get('target_arch') == 'x64' and | 157 gyp_defines().get('target_arch') == 'x64' and |
| 159 gyp_defines().get('dcheck_always_on') == '1'): | 158 gyp_defines().get('dcheck_always_on') == '1'): |
| 160 add("Switched win x64 trybots from VS2010 to VS2012.") | 159 add("Switched win x64 trybots from VS2010 to VS2012.") |
| 161 | 160 |
| 162 return landmines | 161 return landmines |
| 163 | 162 |
| 164 | 163 |
| 165 def get_target_build_dir(build_tool, target, is_iphone=False): | 164 def get_target_build_dir(build_tool, target, is_iphone=False): |
| 166 """ | 165 """ |
| 167 Returns output directory absolute path dependent on build and targets. | 166 Returns output directory absolute path dependent on build and targets. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 gyp_helper.apply_chromium_gyp_env() | 234 gyp_helper.apply_chromium_gyp_env() |
| 236 | 235 |
| 237 for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'): | 236 for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'): |
| 238 set_up_landmines(target) | 237 set_up_landmines(target) |
| 239 | 238 |
| 240 return 0 | 239 return 0 |
| 241 | 240 |
| 242 | 241 |
| 243 if __name__ == '__main__': | 242 if __name__ == '__main__': |
| 244 sys.exit(main()) | 243 sys.exit(main()) |
| OLD | NEW |