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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 val = os.environ.get('GYP_MSVS_VERSION', '') |
| 72 return int(val) if val else None | 72 return val if val else None |
|
iannucci
2013/06/13 18:12:44
Actually, you can just make this
return os.enviro
robliao
2013/06/13 18:27:31
Done.
| |
| 73 | 73 |
| 74 @memoize() | 74 @memoize() |
| 75 def distributor(): | 75 def distributor(): |
| 76 """ | 76 """ |
| 77 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). |
| 78 Possible values: 'goma', 'ib', '' | 78 Possible values: 'goma', 'ib', '' |
| 79 """ | 79 """ |
| 80 if 'goma' in gyp_defines(): | 80 if 'goma' in gyp_defines(): |
| 81 return 'goma' | 81 return 'goma' |
| 82 elif IsWindows(): | 82 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.') | 147 add('Need to clobber winja goma due to backend cwd cache fix.') |
| 148 if platform() == 'android': | 148 if platform() == 'android': |
| 149 add('Clobber: Resources removed in r195014 require clobber.') | 149 add('Clobber: Resources removed in r195014 require clobber.') |
| 150 if platform() == 'win' and builder() == 'ninja': | 150 if platform() == 'win' and builder() == 'ninja': |
| 151 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.') |
| 152 if platform() == 'linux' and builder() == 'ninja': | 152 if platform() == 'linux' and builder() == 'ninja': |
| 153 add('Builders switching from make to ninja will clobber on this.') | 153 add('Builders switching from make to ninja will clobber on this.') |
| 154 if platform() == 'mac': | 154 if platform() == 'mac': |
| 155 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 | 156 if (platform() == 'win' and builder() == 'ninja' and |
| 157 gyp_msvs_version() == 2012 and | 157 gyp_msvs_version() == '2012' and |
| 158 gyp_defines().get('target_arch') == 'x64' and | 158 gyp_defines().get('target_arch') == 'x64' and |
| 159 gyp_defines().get('dcheck_always_on') == '1'): | 159 gyp_defines().get('dcheck_always_on') == '1'): |
| 160 add("Switched win x64 trybots from VS2010 to VS2012.") | 160 add("Switched win x64 trybots from VS2010 to VS2012.") |
| 161 | 161 |
| 162 return landmines | 162 return landmines |
| 163 | 163 |
| 164 | 164 |
| 165 def get_target_build_dir(build_tool, target, is_iphone=False): | 165 def get_target_build_dir(build_tool, target, is_iphone=False): |
| 166 """ | 166 """ |
| 167 Returns output directory absolute path dependent on build and targets. | 167 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() | 235 gyp_helper.apply_chromium_gyp_env() |
| 236 | 236 |
| 237 for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'): | 237 for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'): |
| 238 set_up_landmines(target) | 238 set_up_landmines(target) |
| 239 | 239 |
| 240 return 0 | 240 return 0 |
| 241 | 241 |
| 242 | 242 |
| 243 if __name__ == '__main__': | 243 if __name__ == '__main__': |
| 244 sys.exit(main()) | 244 sys.exit(main()) |
| OLD | NEW |