OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ | 5 #ifndef TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ |
6 #define TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ | 6 #define TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "tools/gn/config_values.h" | 9 #include "tools/gn/config_values.h" |
10 #include "tools/gn/ninja_target_writer.h" | 10 #include "tools/gn/ninja_target_writer.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // Writes build lines required for precompiled headers. Any generated | 49 // Writes build lines required for precompiled headers. Any generated |
50 // object files will be appended to the given vector. | 50 // object files will be appended to the given vector. |
51 // | 51 // |
52 // input_dep is the stamp file collecting the dependencies required before | 52 // input_dep is the stamp file collecting the dependencies required before |
53 // compiling this target. It will be empty if there are no input deps. | 53 // compiling this target. It will be empty if there are no input deps. |
54 void WritePrecompiledHeaderCommands(const SourceFileTypeSet& used_types, | 54 void WritePrecompiledHeaderCommands(const SourceFileTypeSet& used_types, |
55 const OutputFile& input_dep, | 55 const OutputFile& input_dep, |
56 std::vector<OutputFile>* object_files); | 56 std::vector<OutputFile>* object_files); |
57 | 57 |
58 // Writes a Windows .pch compile build line for a language type. | 58 // Writes a .pch compile build line for a language type. |
59 void WriteWindowsPCHCommand(SubstitutionType flag_type, | 59 void WritePCHCommand(SubstitutionType flag_type, |
60 Toolchain::ToolType tool_type, | 60 Toolchain::ToolType tool_type, |
61 const OutputFile& input_dep, | 61 Tool::PrecompiledHeaderType header_type, |
62 std::vector<OutputFile>* object_files); | 62 const OutputFile& input_dep, |
| 63 std::vector<OutputFile>* object_files); |
63 | 64 |
64 // extra_deps are additional dependencies to run before the rule. | 65 // extra_deps are additional dependencies to run before the rule. |
65 // | 66 // |
66 // iorder_only_dep is the name of the stamp file that covers the dependencies | 67 // order_only_dep is the name of the stamp file that covers the dependencies |
67 // that must be run before doing any compiles. | 68 // that must be run before doing any compiles. |
68 // | 69 // |
69 // The files produced by the compiler will be added to two output vectors. | 70 // The files produced by the compiler will be added to two output vectors. |
70 void WriteSources(const std::vector<OutputFile>& extra_deps, | 71 void WriteSources(const std::vector<OutputFile>& extra_deps, |
71 const OutputFile& order_only_dep, | 72 const OutputFile& order_only_dep, |
72 std::vector<OutputFile>* object_files, | 73 std::vector<OutputFile>* object_files, |
73 std::vector<SourceFile>* other_files); | 74 std::vector<SourceFile>* other_files); |
74 | 75 |
75 // Writes a build line. | 76 // Writes a build line. |
76 void WriteCompilerBuildLine(const SourceFile& source, | 77 void WriteCompilerBuildLine(const SourceFile& source, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const Tool* tool_; | 124 const Tool* tool_; |
124 | 125 |
125 // Cached version of the prefix used for rule types for this toolchain. | 126 // Cached version of the prefix used for rule types for this toolchain. |
126 std::string rule_prefix_; | 127 std::string rule_prefix_; |
127 | 128 |
128 DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter); | 129 DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter); |
129 }; | 130 }; |
130 | 131 |
131 #endif // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ | 132 #endif // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ |
132 | 133 |
OLD | NEW |