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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user