blob: 05c9de6962846a3f2280b5a3f5f6b68d2b91b5d2 [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
17builder = landmine_utils.platform
18distributor = 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':
33 print 'Clobber: Resources removed in r195014 require clobber.'
34 if platform() == 'win' and builder() == 'ninja':
35 print 'Compile on cc_unittests fails due to symbols removed in r185063.'
36 if platform() == 'linux' and builder() == 'ninja':
37 print 'Builders switching from make to ninja will clobber on this.'
38 if platform() == 'mac':
39 print 'Switching from bundle to unbundled dylib (issue 14743002).'
40 if (platform() == 'win' and builder() == 'ninja' and
41 gyp_msvs_version() == '2012' and
42 gyp_defines().get('target_arch') == 'x64' and
43 gyp_defines().get('dcheck_always_on') == '1'):
44 print "Switched win x64 trybots from VS2010 to VS2012."
45 print 'Need to clobber everything due to an IDL change in r154579 (blink)'
46
47
48def main():
49 parser = optparse.OptionParser()
50 parser.add_option('-t', '--target',
51 help=='Target for which the landmines have to be emitted')
52
53 options, args = parser.parse_args()
54
55 if args:
56 parser.error('Unknown arguments %s' % args)
57
58 print_landmines(options.target)
59 return 0
60
61
62if __name__ == '__main__':
63 sys.exit(main())