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

Unified Diff: tools/gn/action_values.cc

Issue 537013002: Add outputs to GN's header checker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/action_values.h ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/action_values.cc
diff --git a/tools/gn/action_values.cc b/tools/gn/action_values.cc
index 80bea62a7da149ad4e83021ce282acd3f0e34426..2215167da366442b1db3a4afe885177ca543aedb 100644
--- a/tools/gn/action_values.cc
+++ b/tools/gn/action_values.cc
@@ -4,8 +4,26 @@
#include "tools/gn/action_values.h"
+#include "tools/gn/substitution_writer.h"
+#include "tools/gn/target.h"
+
ActionValues::ActionValues() {
}
ActionValues::~ActionValues() {
}
+
+void ActionValues::GetOutputsAsSourceFiles(
+ const Target* target,
+ std::vector<SourceFile>* result) const {
+ if (target->output_type() == Target::COPY_FILES ||
+ target->output_type() == Target::ACTION_FOREACH) {
+ // Copy and foreach applies the outputs to the sources.
+ SubstitutionWriter::ApplyListToSources(
+ target->settings(), outputs_, target->sources(), result);
+ } else {
+ // Actions (and anything else that happens to specify an output) just use
+ // the output list with no substitution.
+ SubstitutionWriter::GetListAsSourceFiles(outputs_, result);
+ }
+}
« no previous file with comments | « tools/gn/action_values.h ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698