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

Unified Diff: tools/mb/mb.py

Issue 2027823002: Update mb.py to support gn directories with no args.gn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Proper detection of gn directories Created 4 years, 7 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 | « no previous file | tools/mb/mb_unittest.py » ('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 2c16266c641b09fcb0b12c41863af082a377914f..17a4d4f0c7bb8fa10a70a880e94fc5843b02bb34 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -526,8 +526,9 @@ class MetaBuildWrapper(object):
mb_type_path = self.PathJoin(self.ToAbsPath(build_dir), 'mb_type')
if not self.Exists(mb_type_path):
- gn_args_path = self.PathJoin(self.ToAbsPath(build_dir), 'args.gn')
- if not self.Exists(gn_args_path):
+ toolchain_path = self.PathJoin(self.ToAbsPath(build_dir),
+ 'toolchain.ninja')
+ if not self.Exists(toolchain_path):
self.Print('Must either specify a path to an existing GN build dir '
'or pass in a -m/-b pair or a -c flag to specify the '
'configuration')
@@ -546,8 +547,10 @@ class MetaBuildWrapper(object):
return vals
def GNValsFromDir(self, build_dir):
- args_contents = self.ReadFile(
- self.PathJoin(self.ToAbsPath(build_dir), 'args.gn'))
+ args_contents = ""
+ gn_args_path = self.PathJoin(self.ToAbsPath(build_dir), 'args.gn')
+ if self.Exists(gn_args_path):
+ args_contents = self.ReadFile(gn_args_path)
gn_args = []
for l in args_contents.splitlines():
fields = l.split(' ')
« no previous file with comments | « no previous file | tools/mb/mb_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698