[GN] Implements analyzing dependencies between items.

The goal of this CL is to teach GN analyzer to handle build files.

Previous CL:
https://chromium-review.googlesource.com/c/chromium/src/+/838220
implemented tracking build dependency files for each item that
participates in the build dependency tree.

This CL implements analyzing the dependencies between items so as
to recursively decide the set of items/targets that are either
directly or indirectly affected by a list of modified source files
(including build files).

This CL also writes unit tests to verify the new behaviors.

Bug: 795913
Change-Id: I5c123180183246f719248415cdc496a154b5e754
Reviewed-on: https://chromium-review.googlesource.com/851080
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#527646}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: da71ef3911f81a7453ea8da4297c0eba9c308748
12 files changed
tree: 13508be4d18f9354882883d891594b77ec597ece
  1. tools/