Commit 91344c5f authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[node] accept multiple --extra-gn-args

R=machenbach@chromium.org
NOTRY=true

Change-Id: I8c861a051c8b75d3c631e7dedded5746ea9151d7
Reviewed-on: https://chromium-review.googlesource.com/c/1430066
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59054}
parent c6a812f7
......@@ -67,9 +67,10 @@ def GenerateBuildFiles(options):
else:
gn_args.append("is_debug=false")
for arg in options.extra_gn_args:
gn_args.append(arg)
flattened_args = ' '.join(gn_args)
if options.extra_gn_args:
flattened_args += ' ' + options.extra_gn_args
args = [gn, "gen", options.build_path, "-q", "--args=" + flattened_args]
subprocess.check_call(args)
......@@ -106,7 +107,8 @@ def ParseOptions(args):
parser.add_argument("--bundled-win-toolchain-root",
help="Value for DEPOT_TOOLS_WIN_TOOLCHAIN_ROOT")
parser.add_argument("--depot-tools", help="Absolute path to depot_tools")
parser.add_argument("--extra-gn-args", help="Additional GN args")
parser.add_argument("--extra-gn-args", help="Additional GN args",
action="append")
parser.add_argument("--build", help="Run ninja as opposed to gn gen.",
action="store_true")
parser.add_argument("--max-jobs", help="ninja's -j parameter")
......
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