Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
cmp_google
2012/10/20 22:27:16
before line 1, insert a #!/usr/bin/python call
| |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 """ | |
| 6 This file holds a list of reasons why a particular build needs to be clobbered | |
| 7 (or a list of 'landmines'). | |
| 8 | |
| 9 On every bulid, a list of landmines is generated by running this file and | |
|
cmp_google
2012/10/20 22:27:16
bulid -> build
| |
| 10 saving its output to <build_dir>/<target>/.landmines | |
| 11 | |
| 12 A landmine is tripped when a builder checks out a different revision, and the | |
| 13 diff between the new landmines and the old ones is non-null. At this point, the | |
| 14 build is clobbered. | |
| 15 """ | |
| 16 | |
| 17 import sys | |
| 18 import json | |
|
cmp_google
2012/10/20 22:27:16
line 18 before line 17
| |
| 19 | |
| 20 # Expect no args, JSON on stdin | |
|
cmp_google
2012/10/20 22:27:16
append a period
| |
| 21 assert len(sys.argv) == 1 | |
|
cmp_google
2012/10/20 22:27:16
would be better to output usage text here, and pri
| |
| 22 OPTIONS = json.load(sys.stdin) | |
| 23 | |
| 24 # Some keys in OPTIONS, and example values | |
| 25 # target -> release, debug | |
| 26 # distributor -> goma, ib // build distribution platform | |
| 27 # platform -> win32, mac, linux, android, ios | |
| 28 # arch -> ia32, x64, ... | |
| 29 # builder -> make, ninja, vs | |
| 30 # msvs -> | |
| 31 # version -> 2010, 2012 | |
| 32 | |
| 33 def o(key, default=''): | |
|
cmp_google
2012/10/20 22:27:16
o is very bare, how about opt instead
| |
| 34 return OPTIONS.get(key, default) | |
| 35 | |
| 36 MSVS_VERSION = o('msvs', {}).get('version', '') | |
|
cmp_google
2012/10/20 22:27:16
this line is not used, let's remove it
| |
| 37 | |
| 38 # Now for the good part | |
|
cmp_google
2012/10/20 22:27:16
let's ditch this comment
| |
| 39 | |
| 40 if o('distributor') == 'goma' and o('platform') == 'win32' and \ | |
| 41 o('builder') == 'ninja': | |
|
cmp_google
2012/10/20 22:27:16
to span multiple lines, we prefer to prepend a par
| |
| 42 print 'Need to clobber winja goma due to backend cwd cache fix' | |
|
cmp_google
2012/10/20 22:27:16
append a period to the end of the sentence here
l
| |
| OLD | NEW |