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

Unified Diff: tools/gn/target_generator.cc

Issue 387663003: Improve GN handling of directory templates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/ninja_target_writer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target_generator.cc
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
index 252d9822571c08eb7ad7afd350d2e7e1118cef8e..d38dbd938770bcae8b9858ce5ee30c2f54b99abf 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -222,20 +222,20 @@ void TargetGenerator::FillOutputs() {
if (!value)
return;
- Target::FileList outputs;
- if (!ExtractListOfRelativeFiles(scope_->settings()->build_settings(), *value,
- scope_->GetSourceDir(), &outputs, err_))
+ std::vector<std::string>& outputs = target_->action_values().outputs();
+ if (!ExtractListOfStringValues(*value, &outputs, err_))
return;
// Validate that outputs are in the output dir.
+ bool allow_templates = target_->output_type() == Target::ACTION_FOREACH ||
+ target_->output_type() == Target::COPY_FILES;
CHECK(outputs.size() == value->list_value().size());
for (size_t i = 0; i < outputs.size(); i++) {
if (!EnsureStringIsInOutputDir(
GetBuildSettings()->build_dir(),
- outputs[i].value(), value->list_value()[i], err_))
+ outputs[i], value->list_value()[i], allow_templates, err_))
return;
}
- target_->action_values().outputs().swap(outputs);
}
void TargetGenerator::FillGenericConfigs(const char* var_name,
« no previous file with comments | « tools/gn/ninja_target_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698