Chromium Code Reviews| 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..55604584ae54d5406552f1fa58abd9f9b1bb3acc 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, addint it to the appropriate vector. If the dependency is a source |
|
scottmg
2013/10/08 18:42:03
addint -> adding
|
| + // 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); |