sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [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 | |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 11 | import sys |
| 12 | |
| 13 | import landmine_utils |
| 14 | |
| 15 | |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 16 | distributor = landmine_utils.distributor |
| 17 | gyp_defines = landmine_utils.gyp_defines |
| 18 | gyp_msvs_version = landmine_utils.gyp_msvs_version |
| 19 | platform = landmine_utils.platform |
| 20 | |
| 21 | |
scottmg@chromium.org | 2f8c83b | 2014-08-14 23:03:30 +0900 | [diff] [blame] | 22 | def print_landmines(): |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 23 | """ |
| 24 | ALL LANDMINES ARE EMITTED FROM HERE. |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 25 | """ |
thakis | 0ce7d65 | 2015-03-24 03:57:55 +0900 | [diff] [blame] | 26 | # DO NOT add landmines as part of a regular CL. Landmines are a last-effort |
| 27 | # bandaid fix if a CL that got landed has a build dependency bug and all bots |
| 28 | # need to be cleaned up. If you're writing a new CL that causes build |
| 29 | # dependency problems, fix the dependency problems instead of adding a |
| 30 | # landmine. |
brucedawson | b23dc2d | 2017-06-30 10:25:11 +0900 | [diff] [blame^] | 31 | # |
| 32 | # Before adding or changing a landmine consider the consequences of doing so. |
| 33 | # Doing so will wipe out every output directory on every Chrome developer's |
| 34 | # machine. This can be particularly problematic on Windows where the directory |
| 35 | # deletion may well fail (locked files, command prompt in the directory, |
| 36 | # etc.), and generated .sln and .vcxproj files will be deleted. |
| 37 | # |
| 38 | # This output directory deletion will be repeated when going back and forth |
| 39 | # across the change that added the landmine, adding to the cost. There are |
| 40 | # usually less troublesome alternatives. |
thakis | 0ce7d65 | 2015-03-24 03:57:55 +0900 | [diff] [blame] | 41 | |
thakis | a755a58 | 2016-07-30 09:35:24 +0900 | [diff] [blame] | 42 | if distributor() == 'goma' and platform() == 'win32': |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 43 | print 'Need to clobber winja goma due to backend cwd cache fix.' |
| 44 | if platform() == 'android': |
amistry | 5154ba6 | 2015-01-15 16:09:50 +0900 | [diff] [blame] | 45 | print 'Clobber: to handle new way of suppressing findbugs failures.' |
ianwen | abd3016 | 2015-02-13 08:36:28 +0900 | [diff] [blame] | 46 | print 'Clobber to fix gyp not rename package name (crbug.com/457038)' |
gogerald | e41a96f | 2016-09-27 10:52:41 +0900 | [diff] [blame] | 47 | print 'Clobber to recalculate reversed dependency (crbug.com/639042)' |
thakis | a755a58 | 2016-07-30 09:35:24 +0900 | [diff] [blame] | 48 | if platform() == 'win': |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 49 | print 'Compile on cc_unittests fails due to symbols removed in r185063.' |
thakis | a755a58 | 2016-07-30 09:35:24 +0900 | [diff] [blame] | 50 | if platform() == 'linux': |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 51 | print 'Builders switching from make to ninja will clobber on this.' |
| 52 | if platform() == 'mac': |
| 53 | print 'Switching from bundle to unbundled dylib (issue 14743002).' |
iannucci@chromium.org | 78646dd | 2013-12-17 06:48:08 +0900 | [diff] [blame] | 54 | if platform() in ('win', 'mac'): |
| 55 | print ('Improper dependency for create_nmf.py broke in r240802, ' |
| 56 | 'fixed in r240860.') |
brucedawson | 754915a | 2017-03-10 03:49:37 +0900 | [diff] [blame] | 57 | if platform() == 'win': |
scottmg | 2e3d367 | 2016-12-08 14:58:07 +0900 | [diff] [blame] | 58 | print 'Switch to VS2015 Update 3, 14393 SDK' |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 59 | print 'Need to clobber everything due to an IDL change in r154579 (blink)' |
nbarth@chromium.org | 07c0b32 | 2014-06-06 20:25:13 +0900 | [diff] [blame] | 60 | print 'Need to clobber everything due to gen file moves in r175513 (Blink)' |
jochen@chromium.org | 2278994 | 2014-02-14 00:53:08 +0900 | [diff] [blame] | 61 | if (platform() != 'ios'): |
| 62 | print 'Clobber to get rid of obselete test plugin after r248358' |
machenbach@chromium.org | 46d90b4 | 2014-06-04 23:26:03 +0900 | [diff] [blame] | 63 | print 'Clobber to rebuild GN files for V8' |
blundell | c7690f9 | 2015-01-20 02:18:33 +0900 | [diff] [blame] | 64 | print 'Clobber to get rid of stale generated mojom.h files' |
bradnelson@google.com | 52f2eac | 2014-07-03 08:11:11 +0900 | [diff] [blame] | 65 | print 'Need to clobber everything due to build_nexe change in nacl r13424' |
thakis@chromium.org | b71ec46 | 2014-08-02 07:08:49 +0900 | [diff] [blame] | 66 | print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...' |
eseidel@chromium.org | cfa0286 | 2014-08-06 08:21:53 +0900 | [diff] [blame] | 67 | print 'blink_resources.grd changed: crbug.com/400860' |
Nico Weber | c8cd8d6 | 2014-09-03 08:42:42 +0900 | [diff] [blame] | 68 | print 'ninja dependency cycle: crbug.com/408192' |
petrcermak | 4dec79e | 2014-11-06 11:17:57 +0900 | [diff] [blame] | 69 | print 'Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).' |
dcheng | 60283a8 | 2014-11-26 14:04:55 +0900 | [diff] [blame] | 70 | print 'Another clobber for missing NaCl gyp deps (crbug.com/427427).' |
Daniel Cheng | 2dcdbf0 | 2014-12-24 07:54:10 +0900 | [diff] [blame] | 71 | print 'Clobber to fix GN not picking up increased ID range (crbug.com/444902)' |
ncbray | 3318b09 | 2015-02-19 05:10:55 +0900 | [diff] [blame] | 72 | print 'Remove NaCl toolchains from the output dir (crbug.com/456902)' |
miu | 352541f | 2015-05-10 09:15:21 +0900 | [diff] [blame] | 73 | if platform() == 'ios': |
| 74 | print 'Clobber iOS to workaround Xcode deps bug (crbug.com/485435)' |
luqui | 4954913 | 2015-07-15 05:27:55 +0900 | [diff] [blame] | 75 | if platform() == 'win': |
| 76 | print 'Clobber to delete stale generated files (crbug.com/510086)' |
pvalenzuela | 1064eef | 2015-08-26 03:44:01 +0900 | [diff] [blame] | 77 | if platform() == 'android' and gyp_defines().get('target_arch') == 'arm64': |
| 78 | print 'Clobber to support new location/infra for chrome_sync_shell_apk' |
luqui | 7060843 | 2015-09-02 09:19:54 +0900 | [diff] [blame] | 79 | if platform() == 'mac': |
| 80 | print 'Clobber to get rid of evil libsqlite3.dylib (crbug.com/526208)' |
bpastene | 189a0a3 | 2016-06-17 04:26:08 +0900 | [diff] [blame] | 81 | if platform() == 'mac': |
| 82 | print 'Clobber to remove libsystem.dylib. See crbug.com/620075' |
Philip Jägenstedt | 4fd2550 | 2017-01-11 18:25:44 +0900 | [diff] [blame] | 83 | if platform() == 'mac': |
| 84 | print 'Clobber to get past mojo gen build error (crbug.com/679607)' |
brettw | ce38c19 | 2017-03-25 01:36:42 +0900 | [diff] [blame] | 85 | if platform() == 'win': |
| 86 | print 'Clobber Windows to fix strange PCH-not-rebuilt errors.' |
Andrii Shyshkalov | 00c5136 | 2017-06-23 18:58:48 +0900 | [diff] [blame] | 87 | print 'CLobber all to fix GN breakage (crbug.com/736215)' |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 88 | |
| 89 | def main(): |
scottmg@chromium.org | 2f8c83b | 2014-08-14 23:03:30 +0900 | [diff] [blame] | 90 | print_landmines() |
sivachandra@chromium.org | 54da968 | 2013-08-21 11:44:58 +0900 | [diff] [blame] | 91 | return 0 |
| 92 | |
| 93 | |
| 94 | if __name__ == '__main__': |
| 95 | sys.exit(main()) |