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

Unified Diff: tools/mb/mb.py

Issue 1877173002: Change how MB handles goma_dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/build/bots/tryserver.chromium.mac/ios_rel_device_ninja.json ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/mb/mb.py
diff --git a/tools/mb/mb.py b/tools/mb/mb.py
index 39e810c1a67d45239e845ac5c2afc3f63c01024d..1711b301c85ce9c8aaf536e91a0486e0ecca98f3 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -74,8 +74,8 @@ class MetaBuildWrapper(object):
default=self.default_config,
help='path to config file '
'(default is //tools/mb/mb_config.pyl)')
- subp.add_argument('-g', '--goma-dir', default=self.ExpandUser('~/goma'),
- help='path to goma directory (default is %(default)s).')
+ subp.add_argument('-g', '--goma-dir',
+ help='path to goma directory')
subp.add_argument('-n', '--dryrun', action='store_true',
help='Do a dry run (i.e., do nothing, just print '
'the commands that will run)')
@@ -851,7 +851,8 @@ class MetaBuildWrapper(object):
gn_path = self.PathJoin(self.chromium_src_dir, 'buildtools', subdir, exe)
cmd = [gn_path, subcommand, path]
- gn_args = gn_args.replace("$(goma_dir)", self.args.goma_dir)
+ if self.args.goma_dir:
+ gn_args += ' goma_dir="%s"' % self.args.goma_dir
Dirk Pranke 2016/04/12 18:03:20 Ideally gn_args and gyp_defines would be lists of
if gn_args:
cmd.append('--args=%s' % gn_args)
if extra_args:
@@ -1004,9 +1005,11 @@ class MetaBuildWrapper(object):
# GYP uses shlex.split() to split the gyp defines into separate arguments,
# so we can support backslashes and and spaces in arguments by quoting
# them, even on Windows, where this normally wouldn't work.
- if '\\' in goma_dir or ' ' in goma_dir:
+ if goma_dir and ('\\' in goma_dir or ' ' in goma_dir):
goma_dir = "'%s'" % goma_dir
- gyp_defines = gyp_defines.replace("$(goma_dir)", goma_dir)
+
+ if goma_dir:
+ gyp_defines += ' gomadir=%s' % goma_dir
cmd = [
self.executable,
« no previous file with comments | « ios/build/bots/tryserver.chromium.mac/ios_rel_device_ninja.json ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698