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_; |