GN: Generate phony rules for unique executables.

Prior to this CL, if there were multiple targets ina GN build
with the name 'unit_tests', we would not generate a top-level
phony ninja target for them; you would have to specify either
the full path to the output or the label name.

This is confusing for things like 'browser_tests' and 'unit_tests',
where in Chromium we might have multiple targets with that name,
but only one of those is an executable (at least in the default
toolchain).

This CL adds logic to handle that case (so that 'unit_tests' does work).

R=brettw@chromium.org
BUG=480042

Review URL: https://codereview.chromium.org/1101323005

Cr-Original-Commit-Position: refs/heads/master@{#326942}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ab689a4f50c56521396eeab8deb9f8c6945d3c88
1 file changed
tree: a5ccdbdd8aaf1d314218c0e67e2cd54e022befcb
  1. tools/