Implement "friend" for GN header checking.

This allows a target to include private headers it wouldn't otherwise be
able to include. A target can provide a list of patterns of friend
targets that allow dependent targets to bypass public header checking.

A proper dependency path is still required, this applies only to the
concept of public/private headers on a target. Without this, it's
difficult to make a target be explicit about its public headers while
also allowing that target's own tests to use internal headers.

BUG=732993

Change-Id: I1cb94c7ac0db6f74cdcd49d08bcabedf70ea3eb0
Reviewed-on: https://chromium-review.googlesource.com/994453
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#548279}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 28f3c4987aacf447643a4f36e4553cc830508b0b
12 files changed
tree: 7ae4553aa1bb25c8d664317a237d32a16888dade
  1. tools/