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

Unified Diff: tools/gn/target_generator.cc

Issue 46313003: Implement target visibility in GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 a763a31e305ea8fda1c5ceeccf2ffb27f4694d63..5a7078cfb13cad3414b266eb6b04ff26d5aadc4c 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -37,8 +37,19 @@ TargetGenerator::~TargetGenerator() {
void TargetGenerator::Run() {
// All target types use these.
FillDependentConfigs();
+ if (err_->has_error())
+ return;
+
FillData();
+ if (err_->has_error())
+ return;
+
FillDependencies();
+ if (err_->has_error())
+ return;
+
+ if (!Visibility::FillItemVisibility(target_, scope_, err_))
+ return;
// Do type-specific generation.
DoRun();
@@ -163,11 +174,17 @@ void TargetGenerator::FillData() {
void TargetGenerator::FillDependencies() {
FillGenericDeps(variables::kDeps, &target_->deps());
+ if (err_->has_error())
+ return;
FillGenericDeps(variables::kDatadeps, &target_->datadeps());
+ if (err_->has_error())
+ return;
// This is a list of dependent targets to have their configs fowarded, so
// it goes here rather than in FillConfigs.
FillForwardDependentConfigs();
+ if (err_->has_error())
+ return;
FillHardDep();
}

Powered by Google App Engine
This is Rietveld 408576698