Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: tools/gn/target.cc

Issue 1443663004: Don't propagate deps across actions in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/target_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.cc
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index 94cc2e06e824138199edc46c879b9f14042dde45..36559823ee433dc7d826e9e48a95f85494b5ac02 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -198,6 +198,9 @@ bool Target::IsFinal() const {
return output_type_ == EXECUTABLE ||
output_type_ == SHARED_LIBRARY ||
output_type_ == LOADABLE_MODULE ||
+ output_type_ == ACTION ||
+ output_type_ == ACTION_FOREACH ||
+ output_type_ == COPY_FILES ||
(output_type_ == STATIC_LIBRARY && complete_static_lib_);
}
@@ -322,17 +325,13 @@ void Target::PullPublicConfigsFrom(const Target* from) {
void Target::PullRecursiveHardDeps() {
for (const auto& pair : GetDeps(DEPS_LINKED)) {
+ // Direct hard dependencies.
if (pair.ptr->hard_dep())
recursive_hard_deps_.insert(pair.ptr);
- // Android STL doesn't like insert(begin, end) so do it manually.
- // TODO(brettw) this can be changed to
- // insert(iter.target()->begin(), iter.target()->end())
- // when Android uses a better STL.
- for (std::set<const Target*>::const_iterator cur =
- pair.ptr->recursive_hard_deps().begin();
- cur != pair.ptr->recursive_hard_deps().end(); ++cur)
- recursive_hard_deps_.insert(*cur);
+ // Recursive hard dependencies of all dependencies.
+ recursive_hard_deps_.insert(pair.ptr->recursive_hard_deps().begin(),
+ pair.ptr->recursive_hard_deps().end());
}
}
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/target_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698