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" |
11 #include "tools/gn/toolchain.h" | 11 #include "tools/gn/toolchain.h" |
12 #include "tools/gn/unique_vector.h" | 12 #include "tools/gn/unique_vector.h" |
13 | 13 |
14 struct EscapeOptions; | 14 struct EscapeOptions; |
15 class SourceFileTypeSet; | 15 class SourceFileTypeSet; |
16 | 16 |
17 // Writes a .ninja file for a binary target type (an executable, a shared | 17 // Writes a .ninja file for a binary target type (an executable, a shared |
18 // library, or a static library). | 18 // library, or a static library). |
19 class NinjaBinaryTargetWriter : public NinjaTargetWriter { | 19 class NinjaBinaryTargetWriter : public NinjaTargetWriter { |
20 public: | 20 public: |
21 class SourceFileTypeSet; | |
22 | |
23 NinjaBinaryTargetWriter(const Target* target, std::ostream& out); | 21 NinjaBinaryTargetWriter(const Target* target, std::ostream& out); |
24 ~NinjaBinaryTargetWriter() override; | 22 ~NinjaBinaryTargetWriter() override; |
25 | 23 |
26 void Run() override; | 24 void Run() override; |
27 | 25 |
28 private: | 26 private: |
29 typedef std::set<OutputFile> OutputFileSet; | 27 typedef std::set<OutputFile> OutputFileSet; |
30 | 28 |
31 // Writes all flags for the compiler: includes, defines, cflags, etc. | 29 // Writes all flags for the compiler: includes, defines, cflags, etc. |
32 void WriteCompilerVars(const SourceFileTypeSet& used_types); | 30 void WriteCompilerVars(const SourceFileTypeSet& used_types); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 const Tool* tool_; | 148 const Tool* tool_; |
151 | 149 |
152 // Cached version of the prefix used for rule types for this toolchain. | 150 // Cached version of the prefix used for rule types for this toolchain. |
153 std::string rule_prefix_; | 151 std::string rule_prefix_; |
154 | 152 |
155 DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter); | 153 DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter); |
156 }; | 154 }; |
157 | 155 |
158 #endif // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ | 156 #endif // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ |
159 | 157 |
OLD | NEW |