autoninja: fix behavior when passed args after '--'

This is to make command like below works with autoninja.
```
$ autoninja -C out/Default -- base
```

This '--' is inserted in
https://source.chromium.org/chromium/chromium/tools/build/+/main:recipes/recipe_modules/tricium_clang_tidy/resources/tricium_clang_tidy_script.py;l=129;drc=c2f28b4ccdaad78041caf6710edc2f75f44160ae

Bug: 336474469
Change-Id: Iad326ed592d7c968073fd6f4a89c06763992c51f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5472533
Reviewed-by: Philipp Wollermann <philwo@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
changes/33/5472533/3
Takuto Ikuta 2 years ago committed by LUCI CQ
parent bba165a25c
commit 401216ed9b

@ -362,7 +362,7 @@ def main(args):
if use_remoteexec:
ninja_path = os.path.join(SCRIPT_DIR, "ninja_reclient.py")
args = [sys.executable, ninja_path] + input_args[1:]
args = [sys.executable, ninja_path]
num_cores = multiprocessing.cpu_count()
if not j_specified and not t_specified:
@ -404,6 +404,10 @@ def main(args):
if summarize_build:
# Enable statistics collection in Ninja.
args += ["-d", "stats"]
args += input_args[1:]
if summarize_build:
# Print the command-line to reassure the user that the right settings
# are being used.
_print_cmd(args)

Loading…
Cancel
Save