Add --verbose flag to gn wrapper (flutter/engine#28318)

When debugging gn invocations, it's useful to be able to run the
underlying `gn` tool in verbose mode. This adds a `--verbose` flag that
passes the `-v` flag on the underlying `gn` invocation.
This commit is contained in:
Chris Bracken
2021-08-25 20:48:08 -07:00
committed by GitHub
parent 0314797a75
commit a69f834185

View File

@@ -493,6 +493,9 @@ def parse_args(args):
parser.add_argument('--trace-gn', default=False, action='store_true',
help='Write a GN trace log (gn_trace.json) in the Chromium tracing format in the build directory.')
# Verbose output.
parser.add_argument('--verbose', default=False, action='store_true')
return parser.parse_args(args)
def main(argv):
@@ -526,6 +529,9 @@ def main(argv):
if args.trace_gn:
command.append('--tracelog=%s/gn_trace.json' % out_dir)
if args.verbose:
command.append('-v')
print("Generating GN files in: %s" % out_dir)
try:
gn_call_result = subprocess.call(command, cwd=SRC_ROOT)