| 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_BUILD_WRITER_H_ | 5 #ifndef TOOLS_GN_NINJA_BUILD_WRITER_H_ |
| 6 #define TOOLS_GN_NINJA_BUILD_WRITER_H_ | 6 #define TOOLS_GN_NINJA_BUILD_WRITER_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static bool RunAndWriteFile( | 42 static bool RunAndWriteFile( |
| 43 const BuildSettings* settings, | 43 const BuildSettings* settings, |
| 44 const Builder& builder, | 44 const Builder& builder, |
| 45 Err* err); | 45 Err* err); |
| 46 | 46 |
| 47 bool Run(Err* err); | 47 bool Run(Err* err); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 void WriteNinjaRules(); | 50 void WriteNinjaRules(); |
| 51 void WriteAllPools(); | 51 void WriteAllPools(); |
| 52 void WriteSubninjas(); | 52 bool WriteSubninjas(Err* err); |
| 53 bool WritePhonyAndAllRules( | 53 bool WritePhonyAndAllRules(Err* err); |
| 54 Err* err); | |
| 55 | 54 |
| 56 void WritePhonyRule(const Target* target, const std::string& phony_name); | 55 void WritePhonyRule(const Target* target, const std::string& phony_name); |
| 57 | 56 |
| 58 const BuildSettings* build_settings_; | 57 const BuildSettings* build_settings_; |
| 59 | 58 |
| 60 const std::unordered_map<const Settings*, const Toolchain*>& used_toolchains_; | 59 const std::unordered_map<const Settings*, const Toolchain*>& used_toolchains_; |
| 61 const Toolchain* default_toolchain_; | 60 const Toolchain* default_toolchain_; |
| 62 const std::vector<const Target*>& default_toolchain_targets_; | 61 const std::vector<const Target*>& default_toolchain_targets_; |
| 63 | 62 |
| 64 std::ostream& out_; | 63 std::ostream& out_; |
| 65 std::ostream& dep_out_; | 64 std::ostream& dep_out_; |
| 66 PathOutput path_output_; | 65 PathOutput path_output_; |
| 67 | 66 |
| 68 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter); | 67 DISALLOW_COPY_AND_ASSIGN(NinjaBuildWriter); |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 #endif // TOOLS_GN_NINJA_BUILD_WRITER_H_ | 70 #endif // TOOLS_GN_NINJA_BUILD_WRITER_H_ |
| 72 | 71 |
| OLD | NEW |