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

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

Issue 1234343003: Revert of Update docs and command line flags for MB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rm_gnisolate
Patch Set: Created 5 years, 5 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
« no previous file with comments | « tools/mb/docs/README.md ('k') | tools/mb/docs/user_guide.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # The MB (Meta-Build wrapper) design spec 1 # The MB (Meta-Build wrapper) design spec
2 2
3 [TOC] 3 [TOC]
4 4
5 ## Intro 5 ## Intro
6 6
7 MB is intended to address two major aspects of the GYP -> GN transition 7 MB is intended to address two major aspects of the GYP -> GN transition
8 for Chromium: 8 for Chromium:
9 9
10 1. "bot toggling" - make it so that we can easily flip a given bot 10 1. "bot toggling" - make it so that we can easily flip a given bot
11 back and forth between GN and GYP. 11 back and forth between GN and GYP.
12 12
13 2. "bot configuration" - provide a single source of truth for all of 13 2. "bot configuration" - provide a single source of truth for all of
14 the different configurations (os/arch/`gyp_define` combinations) of 14 the different configurations (os/arch/`gyp_define` combinations) of
15 Chromium that are supported. 15 Chromium that are supported.
16 16
17 MB must handle at least the `gen` and `analyze` steps on the bots, i.e., 17 MB must handle at least the `gen` and `analyze` steps on the bots, i.e.,
18 we need to wrap both the `gyp_chromium` invocation to generate the 18 we need to wrap both the `gyp_chromium` invocation to generate the
19 Ninja files, and the `analyze` step that takes a list of modified files 19 Ninja files, and the `analyze` step that takes a list of modified files
20 and a list of targets to build and returns which targets are affected by 20 and a list of targets to build and returns which targets are affected by
21 the files. 21 the files.
22 22
23 For more information on how to actually use MB, see
24 [the user guide](user_guide.md).
25
26 ## Design 23 ## Design
27 24
28 MB is intended to be as simple as possible, and to defer as much work as 25 MB is intended to be as simple as possible, and to defer as much work as
29 possible to GN or GYP. It should live as a very simple Python wrapper 26 possible to GN or GYP. It should live as a very simple Python wrapper
30 that offers little in the way of surprises. 27 that offers little in the way of surprises.
31 28
32 ### Command line 29 ### Command line
33 30
34 It is structured as a single binary that supports a list of subcommands: 31 It is structured as a single binary that supports a list of subcommands:
35 32
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 115
119 Instead, we have one config per unique combination of flags only. 116 Instead, we have one config per unique combination of flags only.
120 117
121 In other words, rather than having `linux_rel_bot`, `win_rel_bot`, and 118 In other words, rather than having `linux_rel_bot`, `win_rel_bot`, and
122 `mac_rel_bot`, we just have `rel_bot`. 119 `mac_rel_bot`, we just have `rel_bot`.
123 120
124 This design allows us to determine easily all of the different sets 121 This design allows us to determine easily all of the different sets
125 of flags that we need to support, but *not* which flags are used on which 122 of flags that we need to support, but *not* which flags are used on which
126 host/target combinations. 123 host/target combinations.
127 124
128 It may be that we should really track the latter. Doing so is just a 125 It may be that we should really track the latter. Doing so is just a
129 config file change, however. 126 config file change, however.
130 127
131 ### Non-goals 128 ### Non-goals
132 129
133 * MB is not intended to replace direct invocation of GN or GYP for 130 * MB is not intended to replace direct invocation of GN or GYP for
134 complicated build scenarios (aka ChromeOS), where multiple flags need 131 complicated build scenarios (aka ChromeOS), where multiple flags need
135 to be set to user-defined paths for specific toolchains (e.g., where 132 to be set to user-defined paths for specific toolchains (e.g., where
136 ChromeOS needs to specify specific board types and compilers). 133 ChromeOS needs to specify specific board types and compilers).
137 134
138 * MB is not intended at this time to be something developers use frequently, 135 * MB is not intended at this time to be something developers use frequently,
139 or to add a lot of features to. We hope to be able to get rid of it once 136 or to add a lot of features to. We hope to be able to get rid of it once
140 the GYP->GN migration is done, and so we should not add things for 137 the GYP->GN migration is done, and so we should not add things for
141 developers that can't easily be added to GN itself. 138 developers that can't easily be added to GN itself.
142 139
143 * MB is not intended to replace the 140 * MB is not intended to replace the
144 [CR tool](https://code.google.com/p/chromium/wiki/CRUserManual). Not 141 [CR tool](https://code.google.com/p/chromium/wiki/CRUserManual). Not
145 only is it only intended to replace the gyp\_chromium part of `'gclient 142 only is it only intended to replace the gyp\_chromium part of `'gclient
146 runhooks'`, it is not really meant as a developer-facing tool. 143 runhooks'`, it is not really meant as a developer-facing tool.
147 144
148 ### Open issues 145 ### Open issues
149 146
150 * Some common flags (goma\_dir being the obvious one) may need to be 147 * Some common flags (goma\_dir being the obvious one) may need to be
151 specified via the user, and it's unclear how to integrate this with 148 specified via the user, and it's unclear how to integrate this with
152 the concept of build\_configs. 149 the concept of build\_configs.
153 150
154 Right now, MB has hard-coded support for a few flags (i.e., you can 151 Right now, MB has hard-coded support for a few flags (i.e., you can
155 pass the --goma-dir flag, and it will know to expand "${goma\_dir}" in 152 pass the --goma-dir flag, and it will know to expand "${goma\_dir}" in
156 the string before calling out to the tool. We may want to generalize 153 the string before calling out to the tool. We may want to generalize
157 this to a common key/value approach (perhaps then meeting the 154 this to a common key/value approach (perhaps then meeting the
158 ChromeOS non-goal, above), or we may want to keep this very strictly 155 ChromeOS non-goal, above), or we may want to keep this very strictly
159 limited for simplicity. 156 limited for simplicity.
OLDNEW
« no previous file with comments | « tools/mb/docs/README.md ('k') | tools/mb/docs/user_guide.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698