James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame^] | 1 | #!/usr/bin/env python |
| 2 | # Copyright 2013 The Chromium Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | """ |
| 7 | This file emits the list of reasons why a particular build needs to be clobbered |
| 8 | (or a list of 'landmines'). |
| 9 | """ |
| 10 | |
| 11 | import sys |
| 12 | |
| 13 | import landmine_utils |
| 14 | |
| 15 | |
| 16 | builder = landmine_utils.builder |
| 17 | distributor = landmine_utils.distributor |
| 18 | gyp_defines = landmine_utils.gyp_defines |
| 19 | gyp_msvs_version = landmine_utils.gyp_msvs_version |
| 20 | platform = landmine_utils.platform |
| 21 | |
| 22 | |
| 23 | def print_landmines(): |
| 24 | """ |
| 25 | ALL LANDMINES ARE EMITTED FROM HERE. |
| 26 | """ |
| 27 | if (distributor() == 'goma' and platform() == 'win32' and |
| 28 | builder() == 'ninja'): |
| 29 | print 'Need to clobber winja goma due to backend cwd cache fix.' |
| 30 | if platform() == 'android': |
| 31 | print 'Clobber: To delete newly generated mojo class files.' |
| 32 | if platform() == 'win' and builder() == 'ninja': |
| 33 | print 'Compile on cc_unittests fails due to symbols removed in r185063.' |
| 34 | if platform() == 'linux' and builder() == 'ninja': |
| 35 | print 'Builders switching from make to ninja will clobber on this.' |
| 36 | if platform() == 'mac': |
| 37 | print 'Switching from bundle to unbundled dylib (issue 14743002).' |
| 38 | if platform() in ('win', 'mac'): |
| 39 | print ('Improper dependency for create_nmf.py broke in r240802, ' |
| 40 | 'fixed in r240860.') |
| 41 | if (platform() == 'win' and builder() == 'ninja' and |
| 42 | gyp_msvs_version() == '2012' and |
| 43 | gyp_defines().get('target_arch') == 'x64' and |
| 44 | gyp_defines().get('dcheck_always_on') == '1'): |
| 45 | print "Switched win x64 trybots from VS2010 to VS2012." |
| 46 | if (platform() == 'win' and builder() == 'ninja' and |
| 47 | gyp_msvs_version().startswith('2013')): |
| 48 | print "Switched win from VS2010 to VS2013." |
| 49 | print "Update to VS2013 Update 2." |
| 50 | print 'Need to clobber everything due to an IDL change in r154579 (blink)' |
| 51 | print 'Need to clobber everything due to gen file moves in r175513 (Blink)' |
| 52 | if (platform() != 'ios'): |
| 53 | print 'Clobber to get rid of obselete test plugin after r248358' |
| 54 | print 'Clobber to rebuild GN files for V8' |
| 55 | print 'Need to clobber everything due to build_nexe change in nacl r13424' |
| 56 | print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...' |
| 57 | print 'blink_resources.grd changed: crbug.com/400860' |
| 58 | print 'ninja dependency cycle: crbug.com/408192' |
| 59 | if platform() == 'android': |
| 60 | print 'Clobber: To delete stale generated .java files.' |
| 61 | print 'Delete stale generated .java files again. crbug.com/349592' |
| 62 | |
| 63 | |
| 64 | def main(): |
| 65 | print_landmines() |
| 66 | return 0 |
| 67 | |
| 68 | |
| 69 | if __name__ == '__main__': |
| 70 | sys.exit(main()) |