| 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_TOOLCHAIN_H_ | 5 #ifndef TOOLS_GN_TOOLCHAIN_H_ |
| 6 #define TOOLS_GN_TOOLCHAIN_H_ | 6 #define TOOLS_GN_TOOLCHAIN_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // Item overrides. | 72 // Item overrides. |
| 73 Toolchain* AsToolchain() override; | 73 Toolchain* AsToolchain() override; |
| 74 const Toolchain* AsToolchain() const override; | 74 const Toolchain* AsToolchain() const override; |
| 75 | 75 |
| 76 // Returns TYPE_NONE on failure. | 76 // Returns TYPE_NONE on failure. |
| 77 static ToolType ToolNameToType(const base::StringPiece& str); | 77 static ToolType ToolNameToType(const base::StringPiece& str); |
| 78 static std::string ToolTypeToName(ToolType type); | 78 static std::string ToolTypeToName(ToolType type); |
| 79 | 79 |
| 80 // Returns null if the tool hasn't been defined. | 80 // Returns null if the tool hasn't been defined. |
| 81 Tool* GetTool(ToolType type); |
| 81 const Tool* GetTool(ToolType type) const; | 82 const Tool* GetTool(ToolType type) const; |
| 82 | 83 |
| 83 // Set a tool. When all tools are configured, you should call | 84 // Set a tool. When all tools are configured, you should call |
| 84 // ToolchainSetupComplete(). | 85 // ToolchainSetupComplete(). |
| 85 void SetTool(ToolType type, std::unique_ptr<Tool> t); | 86 void SetTool(ToolType type, std::unique_ptr<Tool> t); |
| 86 | 87 |
| 87 // Does final setup on the toolchain once all tools are known. | 88 // Does final setup on the toolchain once all tools are known. |
| 88 void ToolchainSetupComplete(); | 89 void ToolchainSetupComplete(); |
| 89 | 90 |
| 90 // Targets that must be resolved before compiling any targets. | 91 // Targets that must be resolved before compiling any targets. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 bool setup_complete_; | 128 bool setup_complete_; |
| 128 | 129 |
| 129 // Substitutions used by the tools in this toolchain. | 130 // Substitutions used by the tools in this toolchain. |
| 130 SubstitutionBits substitution_bits_; | 131 SubstitutionBits substitution_bits_; |
| 131 | 132 |
| 132 LabelTargetVector deps_; | 133 LabelTargetVector deps_; |
| 133 Scope::KeyValueMap args_; | 134 Scope::KeyValueMap args_; |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 #endif // TOOLS_GN_TOOLCHAIN_H_ | 137 #endif // TOOLS_GN_TOOLCHAIN_H_ |
| OLD | NEW |