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

Unified Diff: tools/gn/target_generator.cc

Issue 26561005: GYP generator for GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
Index: tools/gn/target_generator.cc
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
index f32245aa49dc010aa3d87804c4d5290f69acb82f..d5bcfe298c8779c32a980b2595ab98a11dfb803d 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -41,6 +41,7 @@ void TargetGenerator::Run() {
FillDependentConfigs();
FillData();
FillDependencies();
+ FillGypFile();
// To type-specific generation.
DoRun();
@@ -178,6 +179,17 @@ void TargetGenerator::FillDependencies() {
FillHardDep();
}
+void TargetGenerator::FillGypFile() {
+ const Value* gyp_file_value = scope_->GetValue(variables::kGypFile, true);
+ if (!gyp_file_value)
+ return;
+ if (!gyp_file_value->VerifyTypeIs(Value::STRING, err_))
+ return;
+
+ target_->set_gyp_file(scope_->GetSourceDir().ResolveRelativeFile(
+ gyp_file_value->string_value()));
+}
+
void TargetGenerator::FillHardDep() {
const Value* hard_dep_value = scope_->GetValue(variables::kHardDep, true);
if (!hard_dep_value)
« tools/gn/source_dir.cc ('K') | « tools/gn/target_generator.h ('k') | tools/gn/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698