Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bca9b09

Browse files
committed
allow supplying custom gn args in gn wrapper
1 parent 393b564 commit bca9b09

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/gn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,14 @@ def parse_args(args):
11191119
# Verbose output.
11201120
parser.add_argument('--verbose', default=False, action='store_true')
11211121

1122+
parser.add_argument(
1123+
'--gn-args',
1124+
action='append',
1125+
help='Additional gn args to be passed to gn. If you '
1126+
'need to use this, it should probably be another switch '
1127+
'in //flutter/tools/gn.',
1128+
)
1129+
11221130
return parser.parse_args(args)
11231131

11241132

@@ -1174,6 +1182,7 @@ def main(argv):
11741182
command.append('--export-compile-commands=default')
11751183

11761184
gn_args = to_command_line(to_gn_args(args))
1185+
gn_args.extend(args.gn_args or [])
11771186
out_dir = get_out_dir(args)
11781187
command.append(out_dir)
11791188
command.append('--args=%s' % ' '.join(gn_args))

0 commit comments

Comments
 (0)