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

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

Issue 1348153003: Reland "Remove the 'gyp_config' concept from MB." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win32 test on non-win32 platform Created 5 years, 3 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 | « no previous file | tools/mb/mb.py » ('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) user guide 1 # The MB (Meta-Build wrapper) user guide
2 2
3 [TOC] 3 [TOC]
4 4
5 ## Introduction 5 ## Introduction
6 6
7 `mb` is a simple python wrapper around the GYP and GN meta-build tools to 7 `mb` is a simple python wrapper around the GYP and GN meta-build tools to
8 be used as part of the GYP->GN migration. 8 be used as part of the GYP->GN migration.
9 9
10 It is intended to be used by bots to make it easier to manage the configuration 10 It is intended to be used by bots to make it easier to manage the configuration
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 configuration commonly used by develpers but that we may not have a bot 165 configuration commonly used by develpers but that we may not have a bot
166 for. 166 for.
167 167
168 The value of each key is a list of "mixins" that will define what that 168 The value of each key is a list of "mixins" that will define what that
169 build_config does. Each item in the list must be an entry in the dictionary 169 build_config does. Each item in the list must be an entry in the dictionary
170 value of the `mixins` key. 170 value of the `mixins` key.
171 171
172 Each mixin value is itself a dictionary that contains one or more of the 172 Each mixin value is itself a dictionary that contains one or more of the
173 following keys: 173 following keys:
174 174
175 * `gyp_configs`: a list of the configurations to build, e.g.,
176 ['Release', 'Release_x64'].
177 * `gyp_crosscompile`: a boolean; if true, GYP_CROSSCOMPILE=1 is set in 175 * `gyp_crosscompile`: a boolean; if true, GYP_CROSSCOMPILE=1 is set in
178 the environment and passed to GYP. 176 the environment and passed to GYP.
179 * `gyp_defines`: a string containing a list of GYP_DEFINES. 177 * `gyp_defines`: a string containing a list of GYP_DEFINES.
180 * `gn_args`: a string containing a list of values passed to gn --args. 178 * `gn_args`: a string containing a list of values passed to gn --args.
181 * `mixins`: a list of other mixins that should be included. 179 * `mixins`: a list of other mixins that should be included.
182 * `type`: a string with either the value `gyp` or `gn`; 180 * `type`: a string with either the value `gyp` or `gn`;
183 setting this indicates which meta-build tool to use. 181 setting this indicates which meta-build tool to use.
184 182
185 When `mb gen` or `mb analyze` executes, it takes a config name, looks it 183 When `mb gen` or `mb analyze` executes, it takes a config name, looks it
186 up in the 'configs' dict, and then does a left-to-right expansion of the 184 up in the 'configs' dict, and then does a left-to-right expansion of the
187 mixins; gyp_defines and gn_args values are concatenated, and type and 185 mixins; gyp_defines and gn_args values are concatenated, and the type values
188 gyp_configs values override each other. 186 override each other.
189 187
190 For example, if you had: 188 For example, if you had:
191 189
192 ``` 190 ```
193 { 191 {
194 'configs`: { 192 'configs`: {
195 'linux_release_trybot': ['gyp_release', 'trybot'], 193 'linux_release_trybot': ['gyp_release', 'trybot'],
196 'gn_shared_debug': None, 194 'gn_shared_debug': None,
197 } 195 }
198 'mixins': { 196 'mixins': {
199 'bot': { 197 'bot': {
200 'gyp_defines': 'use_goma=1 dcheck_always_on=0', 198 'gyp_defines': 'use_goma=1 dcheck_always_on=0',
201 'gn_args': 'use_goma=true dcheck_always_on=false', 199 'gn_args': 'use_goma=true dcheck_always_on=false',
202 }, 200 },
203 'debug': { 201 'debug': {
204 'gn_args': 'is_debug=true', 202 'gn_args': 'is_debug=true',
205 }, 203 },
206 'gn': {'type': 'gn'}, 204 'gn': {'type': 'gn'},
207 'gyp_release': { 205 'gyp_release': {
208 'gyp_config': 'Release'
209 'mixins': ['release'], 206 'mixins': ['release'],
210 'type': 'gyp', 207 'type': 'gyp',
211 }, 208 },
212 'release': { 209 'release': {
213 'gn_args': 'is_debug=false', 210 'gn_args': 'is_debug=false',
214 } 211 }
215 'shared': { 212 'shared': {
216 'gn_args': 'is_component_build=true', 213 'gn_args': 'is_component_build=true',
217 'gyp_defines': 'component=shared_library', 214 'gyp_defines': 'component=shared_library',
218 }, 215 },
(...skipping 19 matching lines...) Expand all
238 run than you expect; running `'mb -v'` will print what it's doing and 235 run than you expect; running `'mb -v'` will print what it's doing and
239 run the commands; `'mb -n'` will print what it will do but *not* run 236 run the commands; `'mb -n'` will print what it will do but *not* run
240 the commands. 237 the commands.
241 238
242 If you hit weirder things than that, add some print statements to the 239 If you hit weirder things than that, add some print statements to the
243 python script, send a question to gn-dev@chromium.org, or 240 python script, send a question to gn-dev@chromium.org, or
244 [file a bug](https://crbug.com/new) with the label 241 [file a bug](https://crbug.com/new) with the label
245 'mb' and cc: dpranke@chromium.org. 242 'mb' and cc: dpranke@chromium.org.
246 243
247 244
OLDNEW
« no previous file with comments | « no previous file | tools/mb/mb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698