Index: tools/gn/target_generator.cc |
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc |
index 02ed8b74cc6e202528a4eccd3a83aa7e02a4eb26..084c587c9838ed0b5e7b5d513dcecf0fb6db3887 100644 |
--- a/tools/gn/target_generator.cc |
+++ b/tools/gn/target_generator.cc |
@@ -160,16 +160,23 @@ void TargetGenerator::FillPublic() { |
target_->public_headers().swap(dest_public); |
} |
-void TargetGenerator::FillSourcePrereqs() { |
- const Value* value = scope_->GetValue(variables::kSourcePrereqs, true); |
- if (!value) |
- return; |
+void TargetGenerator::FillInputs() { |
+ const Value* value = scope_->GetValue(variables::kInputs, true); |
+ if (!value) { |
+ // Older versions used "source_prereqs". Allow use of this variable until |
+ // all callers are updated. |
+ // TODO(brettw) remove this eventually. |
+ value = scope_->GetValue("source_prereqs", true); |
+ |
+ if (!value) |
+ return; |
+ } |
- Target::FileList dest_reqs; |
+ Target::FileList dest_inputs; |
if (!ExtractListOfRelativeFiles(scope_->settings()->build_settings(), *value, |
- scope_->GetSourceDir(), &dest_reqs, err_)) |
+ scope_->GetSourceDir(), &dest_inputs, err_)) |
return; |
- target_->source_prereqs().swap(dest_reqs); |
+ target_->inputs().swap(dest_inputs); |
} |
void TargetGenerator::FillConfigs() { |