Index: tools/gn/ninja_binary_target_writer.h |
diff --git a/tools/gn/ninja_binary_target_writer.h b/tools/gn/ninja_binary_target_writer.h |
index 047ed2a46cd2f272dad8fe5848615a8d4d2aa4b8..8c57ffb2743bf3921f58eadc7811808888044998 100644 |
--- a/tools/gn/ninja_binary_target_writer.h |
+++ b/tools/gn/ninja_binary_target_writer.h |
@@ -19,6 +19,8 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter { |
virtual void Run() OVERRIDE; |
private: |
+ typedef std::set<OutputFile> OutputFileSet; |
+ |
void WriteCompilerVars(); |
void WriteSources(std::vector<OutputFile>* object_files); |
void WriteLinkerStuff(const std::vector<OutputFile>& object_files); |
@@ -29,6 +31,32 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter { |
const OutputFile& internal_output_file, |
const std::vector<OutputFile>& object_files); |
+ // Writes the stamp line for a source set. These are not linked. |
+ void WriteSourceSetStamp(const std::vector<OutputFile>& object_files); |
+ |
+ // Gets all target dependencies and classifies them, as well as accumulates |
+ // object files from source sets we need to link. |
+ void GetDeps(std::set<OutputFile>* extra_object_files, |
+ std::vector<const Target*>* linkable_deps, |
+ std::vector<const Target*>* non_linkable_deps) const; |
+ |
+ // Classifies the dependency as linkable or nonlinkable with the current |
+ // target, adding it to the appropriate vector. If the dependency is a source |
+ // set we should link in, the source set's object files will be appended to |
+ // |extra_object_files|. |
+ void ClassifyDependency(const Target* dep, |
+ std::set<OutputFile>* extra_object_files, |
+ std::vector<const Target*>* linkable_deps, |
+ std::vector<const Target*>* non_linkable_deps) const; |
+ |
+ // Writes the implicit dependencies for the link or stamp line. This is |
+ // the "||" and everything following it on the ninja line. |
+ // |
+ // The implicit dependencies are the non-linkable deps passed in as an |
+ // argument, plus the data file depdencies in the target. |
+ void WriteImplicitDependencies( |
+ const std::vector<const Target*>& non_linkable_deps); |
+ |
Toolchain::ToolType tool_type_; |
DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter); |