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_TARGET_WRITER_H_ | 5 #ifndef TOOLS_GN_NINJA_TARGET_WRITER_H_ |
6 #define TOOLS_GN_NINJA_TARGET_WRITER_H_ | 6 #define TOOLS_GN_NINJA_TARGET_WRITER_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void WriteCustomSourceRules(const std::string& custom_rule_name, | 42 void WriteCustomSourceRules(const std::string& custom_rule_name, |
43 const std::string& common_deps, | 43 const std::string& common_deps, |
44 const SourceDir& script_cd, | 44 const SourceDir& script_cd, |
45 const std::string& script_cd_to_root, | 45 const std::string& script_cd_to_root, |
46 std::vector<OutputFile>* output_files); | 46 std::vector<OutputFile>* output_files); |
47 | 47 |
48 void WriteCompilerVars(); | 48 void WriteCompilerVars(); |
49 void WriteSources(std::vector<OutputFile>* object_files); | 49 void WriteSources(std::vector<OutputFile>* object_files); |
50 void WriteLinkerStuff(const std::vector<OutputFile>& object_files); | 50 void WriteLinkerStuff(const std::vector<OutputFile>& object_files); |
51 | 51 |
| 52 // Writes the build line for linking the target. Includes newline. |
| 53 void WriteLinkCommand(const OutputFile& external_output_file, |
| 54 const OutputFile& internal_output_file, |
| 55 const std::vector<OutputFile>& object_files); |
| 56 |
52 // Returns NULL if the source type should not be compiled on this target. | 57 // Returns NULL if the source type should not be compiled on this target. |
53 const char* GetCommandForSourceType(SourceFileType type) const; | 58 const char* GetCommandForSourceType(SourceFileType type) const; |
54 | 59 |
55 const char* GetCommandForTargetType() const; | 60 const char* GetCommandForTargetType() const; |
56 | 61 |
57 const Settings* settings_; // Non-owning. | 62 const Settings* settings_; // Non-owning. |
58 const Target* target_; // Non-owning. | 63 const Target* target_; // Non-owning. |
59 std::ostream& out_; | 64 std::ostream& out_; |
60 PathOutput path_output_; | 65 PathOutput path_output_; |
61 | 66 |
62 NinjaHelper helper_; | 67 NinjaHelper helper_; |
63 | 68 |
64 DISALLOW_COPY_AND_ASSIGN(NinjaTargetWriter); | 69 DISALLOW_COPY_AND_ASSIGN(NinjaTargetWriter); |
65 }; | 70 }; |
66 | 71 |
67 #endif // TOOLS_GN_NINJA_TARGET_WRITER_H_ | 72 #endif // TOOLS_GN_NINJA_TARGET_WRITER_H_ |
OLD | NEW |