[email protected] | ec069f7 | 2013-08-21 02:44:58 | [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 | |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 11 | from __future__ import print_function |
| 12 | |
[email protected] | ec069f7 | 2013-08-21 02:44:58 | [diff] [blame] | 13 | import sys |
| 14 | |
| 15 | import landmine_utils |
| 16 | |
| 17 | |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 18 | host_os = landmine_utils.host_os |
[email protected] | ec069f7 | 2013-08-21 02:44:58 | [diff] [blame] | 19 | |
| 20 | |
[email protected] | 9372bec | 2014-08-14 14:03:30 | [diff] [blame] | 21 | def print_landmines(): |
[email protected] | ec069f7 | 2013-08-21 02:44:58 | [diff] [blame] | 22 | """ |
| 23 | ALL LANDMINES ARE EMITTED FROM HERE. |
[email protected] | ec069f7 | 2013-08-21 02:44:58 | [diff] [blame] | 24 | """ |
thakis | 37066a5 | 2015-03-23 18:57:55 | [diff] [blame] | 25 | # DO NOT add landmines as part of a regular CL. Landmines are a last-effort |
| 26 | # bandaid fix if a CL that got landed has a build dependency bug and all bots |
| 27 | # need to be cleaned up. If you're writing a new CL that causes build |
| 28 | # dependency problems, fix the dependency problems instead of adding a |
| 29 | # landmine. |
brucedawson | a1ed2e0 | 2017-06-30 01:25:11 | [diff] [blame] | 30 | # |
| 31 | # Before adding or changing a landmine consider the consequences of doing so. |
| 32 | # Doing so will wipe out every output directory on every Chrome developer's |
| 33 | # machine. This can be particularly problematic on Windows where the directory |
| 34 | # deletion may well fail (locked files, command prompt in the directory, |
| 35 | # etc.), and generated .sln and .vcxproj files will be deleted. |
| 36 | # |
| 37 | # This output directory deletion will be repeated when going back and forth |
| 38 | # across the change that added the landmine, adding to the cost. There are |
| 39 | # usually less troublesome alternatives. |
thakis | 37066a5 | 2015-03-23 18:57:55 | [diff] [blame] | 40 | |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 41 | if host_os() == 'win': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 42 | print('Compile on cc_unittests fails due to symbols removed in r185063.') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 43 | if host_os() == 'linux': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 44 | print('Builders switching from make to ninja will clobber on this.') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 45 | if host_os() == 'mac': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 46 | print('Switching from bundle to unbundled dylib (issue 14743002).') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 47 | if host_os() in ('win', 'mac'): |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 48 | print('Improper dependency for create_nmf.py broke in r240802, ' |
| 49 | 'fixed in r240860.') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 50 | if host_os() == 'win': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 51 | print('Switch to VS2015 Update 3, 14393 SDK') |
| 52 | print('Need to clobber everything due to an IDL change in r154579 (blink)') |
| 53 | print('Need to clobber everything due to gen file moves in r175513 (Blink)') |
| 54 | print('Clobber to get rid of obselete test plugin after r248358') |
| 55 | print('Clobber to rebuild GN files for V8') |
| 56 | print('Clobber to get rid of stale generated mojom.h files') |
| 57 | print('Need to clobber everything due to build_nexe change in nacl r13424') |
| 58 | print( |
| 59 | '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...') |
| 60 | print('blink_resources.grd changed: crbug.com/400860') |
| 61 | print('ninja dependency cycle: crbug.com/408192') |
| 62 | print('Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).') |
| 63 | print('Another clobber for missing NaCl gyp deps (crbug.com/427427).') |
| 64 | print( |
| 65 | 'Clobber to fix GN not picking up increased ID range (crbug.com/444902)') |
| 66 | print('Remove NaCl toolchains from the output dir (crbug.com/456902)') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 67 | if host_os() == 'win': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 68 | print('Clobber to delete stale generated files (crbug.com/510086)') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 69 | if host_os() == 'mac': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 70 | print('Clobber to get rid of evil libsqlite3.dylib (crbug.com/526208)') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 71 | if host_os() == 'mac': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 72 | print('Clobber to remove libsystem.dylib. See crbug.com/620075') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 73 | if host_os() == 'mac': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 74 | print('Clobber to get past mojo gen build error (crbug.com/679607)') |
Michael Achenbach | d76f98f | 2018-02-16 22:40:01 | [diff] [blame] | 75 | if host_os() == 'win': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 76 | print('Clobber Windows to fix strange PCH-not-rebuilt errors.') |
| 77 | print('CLobber all to fix GN breakage (crbug.com/736215)') |
| 78 | print('The Great Blink mv for source files (crbug.com/768828)') |
Kevin Marshall | f428272 | 2019-02-25 01:42:42 | [diff] [blame] | 79 | if host_os() == 'linux': |
Raul Tambre | 4197d3a | 2019-03-19 15:04:20 | [diff] [blame] | 80 | print('Clobber to workaround buggy .ninja_deps cycle (crbug.com/934404)') |
| 81 | |
[email protected] | ec069f7 | 2013-08-21 02:44:58 | [diff] [blame] | 82 | |
| 83 | def main(): |
[email protected] | 9372bec | 2014-08-14 14:03:30 | [diff] [blame] | 84 | print_landmines() |
[email protected] | ec069f7 | 2013-08-21 02:44:58 | [diff] [blame] | 85 | return 0 |
| 86 | |
| 87 | |
| 88 | if __name__ == '__main__': |
| 89 | sys.exit(main()) |