blob: 481970058650ef5a91224b05503ea942f46535d1 [file] [log] [blame]
sivachandra@chromium.org54da9682013-08-21 11:44:58 +09001#!/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"""
7This file emits the list of reasons why a particular build needs to be clobbered
8(or a list of 'landmines').
9"""
10
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090011import sys
12
13import landmine_utils
14
15
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090016distributor = landmine_utils.distributor
17gyp_defines = landmine_utils.gyp_defines
18gyp_msvs_version = landmine_utils.gyp_msvs_version
19platform = landmine_utils.platform
20
21
scottmg@chromium.org2f8c83b2014-08-14 23:03:30 +090022def print_landmines():
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090023 """
24 ALL LANDMINES ARE EMITTED FROM HERE.
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090025 """
thakis0ce7d652015-03-24 03:57:55 +090026 # 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.
brucedawsonb23dc2d2017-06-30 10:25:11 +090031 #
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.
thakis0ce7d652015-03-24 03:57:55 +090041
thakisa755a582016-07-30 09:35:24 +090042 if distributor() == 'goma' and platform() == 'win32':
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090043 print 'Need to clobber winja goma due to backend cwd cache fix.'
44 if platform() == 'android':
amistry5154ba62015-01-15 16:09:50 +090045 print 'Clobber: to handle new way of suppressing findbugs failures.'
ianwenabd30162015-02-13 08:36:28 +090046 print 'Clobber to fix gyp not rename package name (crbug.com/457038)'
gogeralde41a96f2016-09-27 10:52:41 +090047 print 'Clobber to recalculate reversed dependency (crbug.com/639042)'
thakisa755a582016-07-30 09:35:24 +090048 if platform() == 'win':
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090049 print 'Compile on cc_unittests fails due to symbols removed in r185063.'
thakisa755a582016-07-30 09:35:24 +090050 if platform() == 'linux':
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090051 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.org78646dd2013-12-17 06:48:08 +090054 if platform() in ('win', 'mac'):
55 print ('Improper dependency for create_nmf.py broke in r240802, '
56 'fixed in r240860.')
brucedawson754915a2017-03-10 03:49:37 +090057 if platform() == 'win':
scottmg2e3d3672016-12-08 14:58:07 +090058 print 'Switch to VS2015 Update 3, 14393 SDK'
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090059 print 'Need to clobber everything due to an IDL change in r154579 (blink)'
nbarth@chromium.org07c0b322014-06-06 20:25:13 +090060 print 'Need to clobber everything due to gen file moves in r175513 (Blink)'
jochen@chromium.org22789942014-02-14 00:53:08 +090061 if (platform() != 'ios'):
62 print 'Clobber to get rid of obselete test plugin after r248358'
machenbach@chromium.org46d90b42014-06-04 23:26:03 +090063 print 'Clobber to rebuild GN files for V8'
blundellc7690f92015-01-20 02:18:33 +090064 print 'Clobber to get rid of stale generated mojom.h files'
bradnelson@google.com52f2eac2014-07-03 08:11:11 +090065 print 'Need to clobber everything due to build_nexe change in nacl r13424'
thakis@chromium.orgb71ec462014-08-02 07:08:49 +090066 print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...'
eseidel@chromium.orgcfa02862014-08-06 08:21:53 +090067 print 'blink_resources.grd changed: crbug.com/400860'
Nico Weberc8cd8d62014-09-03 08:42:42 +090068 print 'ninja dependency cycle: crbug.com/408192'
petrcermak4dec79e2014-11-06 11:17:57 +090069 print 'Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).'
dcheng60283a82014-11-26 14:04:55 +090070 print 'Another clobber for missing NaCl gyp deps (crbug.com/427427).'
Daniel Cheng2dcdbf02014-12-24 07:54:10 +090071 print 'Clobber to fix GN not picking up increased ID range (crbug.com/444902)'
ncbray3318b092015-02-19 05:10:55 +090072 print 'Remove NaCl toolchains from the output dir (crbug.com/456902)'
miu352541f2015-05-10 09:15:21 +090073 if platform() == 'ios':
74 print 'Clobber iOS to workaround Xcode deps bug (crbug.com/485435)'
luqui49549132015-07-15 05:27:55 +090075 if platform() == 'win':
76 print 'Clobber to delete stale generated files (crbug.com/510086)'
pvalenzuela1064eef2015-08-26 03:44:01 +090077 if platform() == 'android' and gyp_defines().get('target_arch') == 'arm64':
78 print 'Clobber to support new location/infra for chrome_sync_shell_apk'
luqui70608432015-09-02 09:19:54 +090079 if platform() == 'mac':
80 print 'Clobber to get rid of evil libsqlite3.dylib (crbug.com/526208)'
bpastene189a0a32016-06-17 04:26:08 +090081 if platform() == 'mac':
82 print 'Clobber to remove libsystem.dylib. See crbug.com/620075'
Philip Jägenstedt4fd25502017-01-11 18:25:44 +090083 if platform() == 'mac':
84 print 'Clobber to get past mojo gen build error (crbug.com/679607)'
brettwce38c192017-03-25 01:36:42 +090085 if platform() == 'win':
86 print 'Clobber Windows to fix strange PCH-not-rebuilt errors.'
Andrii Shyshkalov00c51362017-06-23 18:58:48 +090087 print 'CLobber all to fix GN breakage (crbug.com/736215)'
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090088
89def main():
scottmg@chromium.org2f8c83b2014-08-14 23:03:30 +090090 print_landmines()
sivachandra@chromium.org54da9682013-08-21 11:44:58 +090091 return 0
92
93
94if __name__ == '__main__':
95 sys.exit(main())