Reland "GN: do not make indirect dependency to direct dependency"

This is a reland of e8a3ce9119189ad6ba5ecaa62bb0b53b07c895f4

Fix for breakage crbug.com/843351 is below.
https://chromium-review.googlesource.com/c/chromium/src/+/1065591


Original change's description:
> GN: do not make indirect dependency to direct dependency
>
> If a target is hard dep, there is no need to have the action targets's
> recursive deps as direct dependency, because such dependency is
> transitive.
>
> This is found by pcc in gn-dev
> https://groups.google.com/a/chromium.org/forum/#!topic/gn-dev/BcrSfPQE84E
>
> With this change, generated android's toolchain.ninja size is reduced
> from 262MB to 31MB. And ninja's startup time reduced from 4.9~5.1s to
> 2.6s.
> I used args.gn same with android_n5x_swarming_rel bot.
>
> Also this patch reduced the time of `gn gen` from 9.5~10.3s to 6.8~7.2s
> on my machine.
>
> Change-Id: I0f0214d3abe74143516b263da839e98b3987fb64
> Reviewed-on: https://chromium-review.googlesource.com/1041506
> Reviewed-by: Brett Wilson <brettw@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557365}

Bug: 843470
Change-Id: I4d3662613b21a1e520517d152865529aa05e813f
Reviewed-on: https://chromium-review.googlesource.com/1065690
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#560520}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3ae94eab7c33428af8e5dcccf85a90975368fa54
5 files changed
tree: b18e4e594a78e05942a609aa72973653b6f7ceba
  1. tools/