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

Unified Diff: tools/gn/target.h

Issue 1621053002: Add an assert_no_deps variable to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment fix Created 4 years, 11 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/setup.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.h
diff --git a/tools/gn/target.h b/tools/gn/target.h
index cbdab35761ef8e77c545921b5e958743b271951b..18e5fb816dd38470de6df31e409ef312f850b153 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -16,6 +16,7 @@
#include "tools/gn/config_values.h"
#include "tools/gn/inherited_libraries.h"
#include "tools/gn/item.h"
+#include "tools/gn/label_pattern.h"
#include "tools/gn/label_ptr.h"
#include "tools/gn/lib_file.h"
#include "tools/gn/ordered_set.h"
@@ -209,6 +210,13 @@ class Target : public Item {
return recursive_hard_deps_;
}
+ std::vector<LabelPattern>& assert_no_deps() {
+ return assert_no_deps_;
+ }
+ const std::vector<LabelPattern>& assert_no_deps() const {
+ return assert_no_deps_;
+ }
+
// The toolchain is only known once this target is resolved (all if its
// dependencies are known). They will be null until then. Generally, this can
// only be used during target writing.
@@ -284,6 +292,7 @@ class Target : public Item {
bool CheckVisibility(Err* err) const;
bool CheckTestonly(Err* err) const;
bool CheckNoNestedStaticLibs(Err* err) const;
+ bool CheckAssertNoDeps(Err* err) const;
void CheckSourcesGenerated() const;
void CheckSourceGenerated(const SourceFile& source) const;
@@ -324,6 +333,8 @@ class Target : public Item {
// target is marked resolved. This will not include the current target.
std::set<const Target*> recursive_hard_deps_;
+ std::vector<LabelPattern> assert_no_deps_;
+
// Used for all binary targets. The precompiled header values in this struct
// will be resolved to the ones to use for this target, if precompiled
// headers are used.
« no previous file with comments | « tools/gn/setup.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698