blob: ee7f76af8f5017e990159a225bcc9e1fc75415d9 [file] [log] [blame]
[email protected]ec069f72013-08-21 02:44:581#!/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
11import optparse
12import sys
13
14import landmine_utils
15
16
[email protected]ba844a932014-01-18 16:21:1417builder = landmine_utils.builder
[email protected]ec069f72013-08-21 02:44:5818distributor = landmine_utils.distributor
19gyp_defines = landmine_utils.gyp_defines
20gyp_msvs_version = landmine_utils.gyp_msvs_version
21platform = landmine_utils.platform
22
23
24def print_landmines(target):
25 """
26 ALL LANDMINES ARE EMITTED FROM HERE.
27 target can be one of {'Release', 'Debug', 'Debug_x64', 'Release_x64'}.
28 """
29 if (distributor() == 'goma' and platform() == 'win32' and
30 builder() == 'ninja'):
31 print 'Need to clobber winja goma due to backend cwd cache fix.'
32 if platform() == 'android':
[email protected]638e64e2014-07-18 17:14:3733 print 'Clobber: To avoid unresolved link errors on Breakpad roll.'
[email protected]88f666c42014-06-25 13:28:5034 print 'Clobber: To get rid of generated files in the wrong package.'
[email protected]ec069f72013-08-21 02:44:5835 if platform() == 'win' and builder() == 'ninja':
36 print 'Compile on cc_unittests fails due to symbols removed in r185063.'
37 if platform() == 'linux' and builder() == 'ninja':
38 print 'Builders switching from make to ninja will clobber on this.'
39 if platform() == 'mac':
40 print 'Switching from bundle to unbundled dylib (issue 14743002).'
[email protected]03d73c0d2013-12-16 21:48:0841 if platform() in ('win', 'mac'):
42 print ('Improper dependency for create_nmf.py broke in r240802, '
43 'fixed in r240860.')
[email protected]ec069f72013-08-21 02:44:5844 if (platform() == 'win' and builder() == 'ninja' and
45 gyp_msvs_version() == '2012' and
46 gyp_defines().get('target_arch') == 'x64' and
47 gyp_defines().get('dcheck_always_on') == '1'):
48 print "Switched win x64 trybots from VS2010 to VS2012."
[email protected]7f9e6bb2014-01-18 02:03:5749 if (platform() == 'win' and builder() == 'ninja' and
[email protected]6ec705b22014-02-06 02:44:5550 gyp_msvs_version().startswith('2013')):
[email protected]7f9e6bb2014-01-18 02:03:5751 print "Switched win from VS2010 to VS2013."
[email protected]d6073472014-05-21 17:10:4352 print "Update to VS2013 Update 2."
[email protected]ec069f72013-08-21 02:44:5853 print 'Need to clobber everything due to an IDL change in r154579 (blink)'
[email protected]267e9a142014-06-06 11:25:1354 print 'Need to clobber everything due to gen file moves in r175513 (Blink)'
[email protected]013d7932014-02-13 15:53:0855 if (platform() != 'ios'):
56 print 'Clobber to get rid of obselete test plugin after r248358'
[email protected]0d600b22014-06-04 14:26:0357 print 'Clobber to rebuild GN files for V8'
[email protected]9b385892014-07-02 23:11:1158 print 'Need to clobber everything due to build_nexe change in nacl r13424'
[email protected]74e19312014-08-01 22:08:4959 print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...'
[email protected]c11618062014-08-05 23:21:5360 print 'blink_resources.grd changed: crbug.com/400860'
[email protected]ec069f72013-08-21 02:44:5861
62
63def main():
64 parser = optparse.OptionParser()
65 parser.add_option('-t', '--target',
66 help=='Target for which the landmines have to be emitted')
67
68 options, args = parser.parse_args()
69
70 if args:
71 parser.error('Unknown arguments %s' % args)
72
73 print_landmines(options.target)
74 return 0
75
76
77if __name__ == '__main__':
78 sys.exit(main())