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

Unified Diff: tools/gn/command_refs.cc

Issue 561273003: Add public deps to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 3 months 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/command_desc.cc ('k') | tools/gn/config_values_extractors_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_refs.cc
diff --git a/tools/gn/command_refs.cc b/tools/gn/command_refs.cc
index 88469ac7d27cc2d46793bbcf09fb8de5ec9f1058..a1b37e578af34e8749b98609b3de8865cff7447d 100644
--- a/tools/gn/command_refs.cc
+++ b/tools/gn/command_refs.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "tools/gn/commands.h"
+#include "tools/gn/deps_iterator.h"
#include "tools/gn/filesystem_utils.h"
#include "tools/gn/input_file.h"
#include "tools/gn/item.h"
@@ -30,17 +31,8 @@ void FillDepMap(Setup* setup, DepMap* dep_map) {
setup->builder()->GetAllResolvedTargets();
for (size_t target_i = 0; target_i < targets.size(); target_i++) {
- const Target* target = targets[target_i];
-
- // Add all deps to the map.
- const LabelTargetVector& deps = target->deps();
- for (size_t dep_i = 0; dep_i < deps.size(); dep_i++)
- dep_map->insert(std::make_pair(deps[dep_i].ptr, target));
-
- // Include data deps as well.
- const LabelTargetVector& datadeps = target->datadeps();
- for (size_t dep_i = 0; dep_i < datadeps.size(); dep_i++)
- dep_map->insert(std::make_pair(datadeps[dep_i].ptr, target));
+ for (DepsIterator iter(targets[target_i]); !iter.done(); iter.Advance())
+ dep_map->insert(std::make_pair(iter.target(), targets[target_i]));
}
}
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/config_values_extractors_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698