Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: tools/mb/docs/user_guide.md

Issue 1005723003: First pass at a meta-build wrapper for the gyp->gn migration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename to mb, add docs Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # The MB (Meta-Build wrapper) user guide
2
3 [TOC]
4
5 ## introduction
6
7 `mb` is a simple python wrapper around the GYP and GN meta-build tools.
8 It is intended to be used by both developers and bots to make it easier
9 to manage one or more builds of Chromium from a single checkout.
10
11 ## `mb gen`
12
13 `mb gen` is responsible for generating the Ninja files by invoking
14 either GYP or GN as appropriate. It can be run one of two ways.
15
16 With no arguments, `mb gen` looks for a [builds.pyl](#//../builds.pyl)
17 file above the checkout for a description of what to build. If no
18 builds.pyl file is found, it attempts to do something sane by default;
19 for now, it calls `gyp_chromium` with no arguments, but passes through
20 the `GYP_DEFINES` env variable if set.
21
22 With two arguments (for example, `'mb gen //out/Release
23 shared_release'`), `mb gen` builds one specific build directory using
24 one specific build config taken from the list of build configs in
25 [//build/mb_conf.pyl](#//mb_conf.pyl).
26
27 ## `mb analyze`
28
29 `mb analyze` is reponsible for determining what targets are affected by
30 a list of files (e.g., the list of files in a patch on a trybot). We
31 don't generally expect users to invoke this directly, so see [the design
32 spec](design_spec.md#Handling_the_analyze_step) for details.
33
34 ## debugging (-v/--verbose and -n/--dry-run)
35
36 By design, MB should be simple enough that very little can go wrong.
37
38 The most obvious issue is that you might see different commands being
39 run than you expect; running `'mb -v'` will print what it's doing and
40 run the commands; `'mb -n'` will print what it will do but *not* run
41 the commands.
42
43 If you hit weirder things than that, add some print statements to the
44 python script, send a question to gn-dev@chromium.org, or
45 [file a bug](https://crbug.com/new) with the label
46 'mb' and cc: dpranke@chromium.org.
47
48 ## //builds/mb_conf.pyl
49
50 The `mb_conf.pyl` config file is intended to enumerate all of the
51 supported build configurations for Chromium. Generally speaking, you
52 should never need to (or want to) build a configuration that isn't
53 listed here, and so by using the configs in this file you can avoid
54 having to juggle long lists of GYP_DEFINES and gn args by hand.
55
56 See [the design spec](design_spec.md#Configurations) for details;
57 generally as a user you should only need worry about the list of keys in
58 the `build_configs` dictionary at the top of file.
59
60 ## //../builds.pyl
61
62 The builds.pyl allows the user to manage and generate multiple sets of
63 build directories at once; it is intended to replace the myriad
64 configuration options for GYP without requiring you to have to manually
65 manage and update multiple sets of gn args.
66
67 The file should contain a python dict with a list of paths as keys, and
68 a list of configurations as values.
69
70 For example (quoting the design spec), this:
71
72 ```
73 src% cat ../build.pyl
74 {
75 "//out/Release": ["linux_release_trybot"],
76 "//out/Debug.gn": ["gn_shared_debug"],
77 }
78 src% mbw gen
79 src%
80 ```
81
82 is the equivalent of:
83
84 ```
85 src% GYP_DEFINES="use_goma=1 dcheck_always_on=0 dcheck_always_on=1" build/gyp_ch romium -G config=Release -G output_dir=out
86 src% gn gen //out/Debug.gn --args='use_goma=true dcheck_always_on=true dcheck_al ways_on=false'
87 ```
88
89 See [the design spec](design_spec.md#Multi-build_support) for more
90 details.
OLDNEW
« tools/mb/README.md ('K') | « tools/mb/docs/design_spec.md ('k') | tools/mb/mb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698