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/compiler_specific.h" | 8 #include "base/compiler_specific.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 | 15 |
16 // Writes a .ninja file for a binary target type (an executable, a shared | 16 // Writes a .ninja file for a binary target type (an executable, a shared |
17 // library, or a static library). | 17 // library, or a static library). |
18 class NinjaBinaryTargetWriter : public NinjaTargetWriter { | 18 class NinjaBinaryTargetWriter : public NinjaTargetWriter { |
19 public: | 19 public: |
20 NinjaBinaryTargetWriter(const Target* target, std::ostream& out); | 20 NinjaBinaryTargetWriter(const Target* target, std::ostream& out); |
21 virtual ~NinjaBinaryTargetWriter(); | 21 virtual ~NinjaBinaryTargetWriter(); |
22 | 22 |
23 virtual void Run() OVERRIDE; | 23 virtual void Run() override; |
24 | 24 |
25 private: | 25 private: |
26 typedef std::set<OutputFile> OutputFileSet; | 26 typedef std::set<OutputFile> OutputFileSet; |
27 | 27 |
28 void WriteCompilerVars(); | 28 void WriteCompilerVars(); |
29 void WriteSources(std::vector<OutputFile>* object_files); | 29 void WriteSources(std::vector<OutputFile>* object_files); |
30 void WriteLinkerStuff(const std::vector<OutputFile>& object_files); | 30 void WriteLinkerStuff(const std::vector<OutputFile>& object_files); |
31 void WriteLinkerFlags(); | 31 void WriteLinkerFlags(); |
32 void WriteLibs(); | 32 void WriteLibs(); |
33 void WriteOutputExtension(); | 33 void WriteOutputExtension(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 Toolchain::ToolType* computed_tool_type, | 76 Toolchain::ToolType* computed_tool_type, |
77 std::vector<OutputFile>* outputs) const; | 77 std::vector<OutputFile>* outputs) const; |
78 | 78 |
79 const Tool* tool_; | 79 const Tool* tool_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter); | 81 DISALLOW_COPY_AND_ASSIGN(NinjaBinaryTargetWriter); |
82 }; | 82 }; |
83 | 83 |
84 #endif // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ | 84 #endif // TOOLS_GN_NINJA_BINARY_TARGET_WRITER_H_ |
85 | 85 |
OLD | NEW |