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

Unified Diff: tools/gn/target.h

Issue 1126193005: Check for inputs not generated by deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data
Patch Set: Created 5 years, 6 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 00500489923ddec832ede0ea067eb9f0183b5b83..58319f121e596209e3c9084aecfe029eb999f8fb 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -221,6 +221,16 @@ class Target : public Item {
// frequently by unit tests which become needlessly verbose.
bool SetToolchain(const Toolchain* toolchain, Err* err = nullptr);
+ // Once this target has been resolved, all outputs from the target will be
+ // listed here. This will include things listed in the "outputs" for an
+ // action or a copy step, and the output library or executable file(s) from
+ // binary targets.
+ //
+ // It will NOT include stamp files and object files.
+ const std::vector<OutputFile>& computed_outputs() const {
+ return computed_outputs_;
+ }
+
// Returns outputs from this target. The link output file is the one that
// other targets link to when they depend on this target. This will only be
// valid for libraries and will be empty for all other target types.
@@ -260,6 +270,8 @@ class Target : public Item {
bool CheckVisibility(Err* err) const;
bool CheckTestonly(Err* err) const;
bool CheckNoNestedStaticLibs(Err* err) const;
+ void CheckSourcesGenerated() const;
+ void CheckSourceGenerated(const SourceFile& source) const;
OutputType output_type_;
std::string output_name_;
@@ -304,7 +316,8 @@ class Target : public Item {
// Toolchain used by this target. Null until target is resolved.
const Toolchain* toolchain_;
- // Output files. Null until the target is resolved.
+ // Output files. Empty until the target is resolved.
+ std::vector<OutputFile> computed_outputs_;
OutputFile link_output_file_;
OutputFile dependency_output_file_;
« 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