OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ | 6 """ |
7 This file emits the list of reasons why a particular build needs to be clobbered | 7 This file emits the list of reasons why a particular build needs to be clobbered |
8 (or a list of 'landmines'). | 8 (or a list of 'landmines'). |
9 """ | 9 """ |
10 | 10 |
11 import optparse | |
12 import sys | 11 import sys |
13 | 12 |
14 import landmine_utils | 13 import landmine_utils |
15 | 14 |
16 | 15 |
17 builder = landmine_utils.builder | 16 builder = landmine_utils.builder |
18 distributor = landmine_utils.distributor | 17 distributor = landmine_utils.distributor |
19 gyp_defines = landmine_utils.gyp_defines | 18 gyp_defines = landmine_utils.gyp_defines |
20 gyp_msvs_version = landmine_utils.gyp_msvs_version | 19 gyp_msvs_version = landmine_utils.gyp_msvs_version |
21 platform = landmine_utils.platform | 20 platform = landmine_utils.platform |
22 | 21 |
23 | 22 |
24 def print_landmines(target): | 23 def print_landmines(): |
25 """ | 24 """ |
26 ALL LANDMINES ARE EMITTED FROM HERE. | 25 ALL LANDMINES ARE EMITTED FROM HERE. |
27 target can be one of {'Release', 'Debug', 'Debug_x64', 'Release_x64'}. | |
28 """ | 26 """ |
29 if (distributor() == 'goma' and platform() == 'win32' and | 27 if (distributor() == 'goma' and platform() == 'win32' and |
30 builder() == 'ninja'): | 28 builder() == 'ninja'): |
31 print 'Need to clobber winja goma due to backend cwd cache fix.' | 29 print 'Need to clobber winja goma due to backend cwd cache fix.' |
32 if platform() == 'android': | 30 if platform() == 'android': |
33 print 'Clobber: To avoid unresolved link errors on Breakpad roll.' | 31 print 'Clobber: To avoid unresolved link errors on Breakpad roll.' |
34 print 'Clobber: To get rid of generated files in the wrong package.' | 32 print 'Clobber: To get rid of generated files in the wrong package.' |
35 if platform() == 'win' and builder() == 'ninja': | 33 if platform() == 'win' and builder() == 'ninja': |
36 print 'Compile on cc_unittests fails due to symbols removed in r185063.' | 34 print 'Compile on cc_unittests fails due to symbols removed in r185063.' |
37 if platform() == 'linux' and builder() == 'ninja': | 35 if platform() == 'linux' and builder() == 'ninja': |
(...skipping 16 matching lines...) Expand all Loading... |
54 print 'Need to clobber everything due to gen file moves in r175513 (Blink)' | 52 print 'Need to clobber everything due to gen file moves in r175513 (Blink)' |
55 if (platform() != 'ios'): | 53 if (platform() != 'ios'): |
56 print 'Clobber to get rid of obselete test plugin after r248358' | 54 print 'Clobber to get rid of obselete test plugin after r248358' |
57 print 'Clobber to rebuild GN files for V8' | 55 print 'Clobber to rebuild GN files for V8' |
58 print 'Need to clobber everything due to build_nexe change in nacl r13424' | 56 print 'Need to clobber everything due to build_nexe change in nacl r13424' |
59 print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...' | 57 print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...' |
60 print 'blink_resources.grd changed: crbug.com/400860' | 58 print 'blink_resources.grd changed: crbug.com/400860' |
61 | 59 |
62 | 60 |
63 def main(): | 61 def main(): |
64 parser = optparse.OptionParser() | 62 print_landmines() |
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 | 63 return 0 |
75 | 64 |
76 | 65 |
77 if __name__ == '__main__': | 66 if __name__ == '__main__': |
78 sys.exit(main()) | 67 sys.exit(main()) |
OLD | NEW |