Commit fca22816 authored by Reid Kleckner's avatar Reid Kleckner Committed by Commit Bot

mb.py: Ignore commented-out gn args

Otherwise, a line containing '#is_asan=true' can add run_with_asan to
the beginning of the command, which will fail.

R=brucedawson@chromium.org, thakis@chromium.org

Change-Id: I31cf9c35cfc0ca04f4c6cc3b5f2376b0c0c58f3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033630Reviewed-by: default avatarReid Kleckner <rnk@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738041}
parent dae6dab1
......@@ -821,6 +821,9 @@ class MetaBuildWrapper(object):
args_contents = self.ReadFile(gn_args_path)
gn_args = []
for l in args_contents.splitlines():
l = l.split('#', 2)[0].strip()
if not l:
continue
fields = l.split(' ')
name = fields[0]
val = ' '.join(fields[2:])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment