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

Unified Diff: tools/gn/function_get_target_outputs.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/command_desc.cc ('k') | tools/gn/header_checker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_get_target_outputs.cc
diff --git a/tools/gn/function_get_target_outputs.cc b/tools/gn/function_get_target_outputs.cc
index 5fb3b5108b604aa68c5551e8febaa6f6cd301bbf..e3a63eeca6b6b45dadc1366fa9d350988169d2cc 100644
--- a/tools/gn/function_get_target_outputs.cc
+++ b/tools/gn/function_get_target_outputs.cc
@@ -118,16 +118,10 @@ Value RunGetTargetOutputs(Scope* scope,
// Compute the output list.
std::vector<SourceFile> files;
- if (target->output_type() == Target::ACTION) {
- // Actions just use the output list with no substitution.
- SubstitutionWriter::GetListAsSourceFiles(
- target->action_values().outputs(), &files);
- } else if (target->output_type() == Target::COPY_FILES ||
- target->output_type() == Target::ACTION_FOREACH) {
- // Copy and foreach appllies the outputs to the sources.
- SubstitutionWriter::ApplyListToSources(
- target->settings(), target->action_values().outputs(),
- target->sources(), &files);
+ if (target->output_type() == Target::ACTION ||
+ target->output_type() == Target::COPY_FILES ||
+ target->output_type() == Target::ACTION_FOREACH) {
+ target->action_values().GetOutputsAsSourceFiles(target, &files);
} else {
// Other types of targets are not supported.
*err = Err(args[0], "Target is not an action, action_foreach, or copy.",
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/header_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698