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 | """ |
Alhaad Gokhale | 4f51307 | 2015-03-24 10:49:34 -0700 | [diff] [blame] | 27 | # DO NOT add landmines as part of a regular CL. Landmines are a last-effort |
| 28 | # bandaid fix if a CL that got landed has a build dependency bug and all bots |
| 29 | # need to be cleaned up. If you're writing a new CL that causes build |
| 30 | # dependency problems, fix the dependency problems instead of adding a |
| 31 | # landmine. |
| 32 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 33 | if (distributor() == 'goma' and platform() == 'win32' and |
| 34 | builder() == 'ninja'): |
| 35 | print 'Need to clobber winja goma due to backend cwd cache fix.' |
| 36 | if platform() == 'android': |
Benjamin Lerman | c366b98 | 2015-05-21 11:50:45 +0200 | [diff] [blame] | 37 | print 'Clobber because of unions.' |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 38 | if platform() == 'win' and builder() == 'ninja': |
| 39 | print 'Compile on cc_unittests fails due to symbols removed in r185063.' |
| 40 | if platform() == 'linux' and builder() == 'ninja': |
| 41 | print 'Builders switching from make to ninja will clobber on this.' |
| 42 | if platform() == 'mac': |
| 43 | print 'Switching from bundle to unbundled dylib (issue 14743002).' |
| 44 | if platform() in ('win', 'mac'): |
| 45 | print ('Improper dependency for create_nmf.py broke in r240802, ' |
| 46 | 'fixed in r240860.') |
| 47 | if (platform() == 'win' and builder() == 'ninja' and |
| 48 | gyp_msvs_version() == '2012' and |
| 49 | gyp_defines().get('target_arch') == 'x64' and |
| 50 | gyp_defines().get('dcheck_always_on') == '1'): |
| 51 | print "Switched win x64 trybots from VS2010 to VS2012." |
| 52 | if (platform() == 'win' and builder() == 'ninja' and |
| 53 | gyp_msvs_version().startswith('2013')): |
| 54 | print "Switched win from VS2010 to VS2013." |
| 55 | print "Update to VS2013 Update 2." |
Benjamin Lerman | 5799890 | 2014-11-18 16:06:02 +0100 | [diff] [blame] | 56 | print "Update to VS2013 Update 4." |
Viet-Trung Luu | 235cf3d | 2015-06-11 10:01:25 -0700 | [diff] [blame] | 57 | if (platform() == 'win' and gyp_msvs_version().startswith('2015')): |
| 58 | print 'Switch to VS2015' |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 59 | print 'Need to clobber everything due to an IDL change in r154579 (blink)' |
| 60 | print 'Need to clobber everything due to gen file moves in r175513 (Blink)' |
| 61 | if (platform() != 'ios'): |
| 62 | print 'Clobber to get rid of obselete test plugin after r248358' |
| 63 | print 'Clobber to rebuild GN files for V8' |
James Robinson | 5e66a79 | 2015-01-21 17:02:08 -0800 | [diff] [blame] | 64 | print 'Clobber to get rid of stale generated mojom.h files' |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 65 | print 'Need to clobber everything due to build_nexe change in nacl r13424' |
| 66 | print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...' |
| 67 | print 'blink_resources.grd changed: crbug.com/400860' |
| 68 | print 'ninja dependency cycle: crbug.com/408192' |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 69 | print 'Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).' |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 70 | print 'Another clobber for missing NaCl gyp deps (crbug.com/427427).' |
James Robinson | 9127e72 | 2014-12-29 14:41:55 -0800 | [diff] [blame] | 71 | print 'Clobber to fix GN not picking up increased ID range (crbug.com/444902)' |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 72 | print 'Remove NaCl toolchains from the output dir (crbug.com/456902)' |
James Robinson | c8f302a | 2015-05-14 16:38:33 -0700 | [diff] [blame] | 73 | if platform() == 'ios': |
| 74 | print 'Clobber iOS to workaround Xcode deps bug (crbug.com/485435)' |
Viet-Trung Luu | 28773a1 | 2015-06-24 13:45:50 -0700 | [diff] [blame] | 75 | print 'Clobber: https://github.com/domokit/mojo/issues/269' |
John McCutchan | cb47ff8 | 2015-08-27 14:01:29 -0700 | [diff] [blame] | 76 | print 'Clobber: https://github.com/domokit/mojo/issues/401' |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 77 | |
| 78 | |
| 79 | def main(): |
| 80 | print_landmines() |
| 81 | return 0 |
| 82 | |
| 83 | |
| 84 | if __name__ == '__main__': |
| 85 | sys.exit(main()) |