Consider bundle_data as public_deps of create_bundle targets.

The create_bundle and bundle_data targets works as a pair to copy
files into iOS/OS X bundles. The bundle_data target defines the
files to copy and the destination in the bundle, the create_bundle
target generate the copy rule (as the destination cannot be resolved
earlier).

This cause a problem with generated files, as gn prevents a target
using as input a generated file unless there is a direct dependency
or a chain of public dependencies. Since bundle_data/create_bundle
are designed to be resolved recursively, update this check to consider
all bundle_data as public_deps of create_bundle targets.

Convert Target::PullRecursiveBundleData() to O(n) algorithm instead
of a O(n^2) by percolating the dependencies up.

BUG=297668

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

Cr-Original-Commit-Position: refs/heads/master@{#383049}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1cc4b1ca2085776730f92ab41173c6afd9d51d12
4 files changed
tree: 304f484664a6146530ad2078f1db3162a0af3b34
  1. tools/