gn: Allow configs to specify and apply `inputs`.

Commonly used config options (cflags, ldflags, ...) can be used to add
arbitrary dependencies on files. For example, if
`-fprofile-sample-use=/tmp/foo` is added to cflags, we need to rebuild
all targets with this flag when /tmp/foo gets modified.

Allowing configs to add to `inputs` seems like the best way to handle
this.

Bug: 794750
Test: Ran gn_unittests; added an `input` on the
build/config/compiler:compiler config, and verified that it showed up
in ninja files/that lots of targets are rebuilt when the input was
touched; ran `gn desc` to manually verify that the input file showed up
on an arbitrary target.

Change-Id: Id1cf03d62589ce77296b2a26a07380e29774ed98
Reviewed-on: https://chromium-review.googlesource.com/827560
Commit-Queue: George Burgess <gbiv@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#528762}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 25e26d931f7c4237ab06051b1439a34e0af81326
24 files changed
tree: 5a09af25f8117d1ef242dfad640ac9414aa3118c
  1. tools/