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_SCRIPT_TARGET_WRITER_H_ | 5 #ifndef TOOLS_GN_NINJA_SCRIPT_TARGET_WRITER_H_ |
6 #define TOOLS_GN_NINJA_SCRIPT_TARGET_WRITER_H_ | 6 #define TOOLS_GN_NINJA_SCRIPT_TARGET_WRITER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "tools/gn/ninja_target_writer.h" | 12 #include "tools/gn/ninja_target_writer.h" |
13 | 13 |
14 class FileTemplate; | 14 class FileTemplate; |
15 class OutputFile; | 15 class OutputFile; |
16 | 16 |
17 // Writes a .ninja file for a custom script target type. | 17 // Writes a .ninja file for a custom script target type. |
18 class NinjaScriptTargetWriter : public NinjaTargetWriter { | 18 class NinjaScriptTargetWriter : public NinjaTargetWriter { |
19 public: | 19 public: |
20 NinjaScriptTargetWriter(const Target* target, std::ostream& out); | 20 NinjaScriptTargetWriter(const Target* target, |
| 21 const Toolchain* toolchain, |
| 22 std::ostream& out); |
21 virtual ~NinjaScriptTargetWriter(); | 23 virtual ~NinjaScriptTargetWriter(); |
22 | 24 |
23 virtual void Run() OVERRIDE; | 25 virtual void Run() OVERRIDE; |
24 | 26 |
25 private: | 27 private: |
26 FRIEND_TEST_ALL_PREFIXES(NinjaScriptTargetWriter, | 28 FRIEND_TEST_ALL_PREFIXES(NinjaScriptTargetWriter, |
27 WriteOutputFilesForBuildLine); | 29 WriteOutputFilesForBuildLine); |
28 FRIEND_TEST_ALL_PREFIXES(NinjaScriptTargetWriter, | 30 FRIEND_TEST_ALL_PREFIXES(NinjaScriptTargetWriter, |
29 WriteArgsSubstitutions); | 31 WriteArgsSubstitutions); |
30 | 32 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 67 |
66 // Path output writer that doesn't do any escaping or quoting. It does, | 68 // Path output writer that doesn't do any escaping or quoting. It does, |
67 // however, convert slashes. Used for | 69 // however, convert slashes. Used for |
68 // computing intermediate strings. | 70 // computing intermediate strings. |
69 PathOutput path_output_no_escaping_; | 71 PathOutput path_output_no_escaping_; |
70 | 72 |
71 DISALLOW_COPY_AND_ASSIGN(NinjaScriptTargetWriter); | 73 DISALLOW_COPY_AND_ASSIGN(NinjaScriptTargetWriter); |
72 }; | 74 }; |
73 | 75 |
74 #endif // TOOLS_GN_NINJA_SCRIPT_TARGET_WRITER_H_ | 76 #endif // TOOLS_GN_NINJA_SCRIPT_TARGET_WRITER_H_ |
OLD | NEW |