| 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 "base/compiler_specific.h" | |
| 9 #include "base/logging.h" | 8 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| 12 #include "tools/gn/item.h" | 11 #include "tools/gn/item.h" |
| 13 #include "tools/gn/label_ptr.h" | 12 #include "tools/gn/label_ptr.h" |
| 14 #include "tools/gn/scope.h" | 13 #include "tools/gn/scope.h" |
| 15 #include "tools/gn/source_file_type.h" | 14 #include "tools/gn/source_file_type.h" |
| 16 #include "tools/gn/substitution_type.h" | 15 #include "tools/gn/substitution_type.h" |
| 17 #include "tools/gn/tool.h" | 16 #include "tools/gn/tool.h" |
| 18 #include "tools/gn/value.h" | 17 #include "tools/gn/value.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 static const char* kToolObjCxx; | 53 static const char* kToolObjCxx; |
| 55 static const char* kToolRc; | 54 static const char* kToolRc; |
| 56 static const char* kToolAsm; | 55 static const char* kToolAsm; |
| 57 static const char* kToolAlink; | 56 static const char* kToolAlink; |
| 58 static const char* kToolSolink; | 57 static const char* kToolSolink; |
| 59 static const char* kToolLink; | 58 static const char* kToolLink; |
| 60 static const char* kToolStamp; | 59 static const char* kToolStamp; |
| 61 static const char* kToolCopy; | 60 static const char* kToolCopy; |
| 62 | 61 |
| 63 Toolchain(const Settings* settings, const Label& label); | 62 Toolchain(const Settings* settings, const Label& label); |
| 64 virtual ~Toolchain(); | 63 ~Toolchain() override; |
| 65 | 64 |
| 66 // Item overrides. | 65 // Item overrides. |
| 67 virtual Toolchain* AsToolchain() override; | 66 Toolchain* AsToolchain() override; |
| 68 virtual const Toolchain* AsToolchain() const override; | 67 const Toolchain* AsToolchain() const override; |
| 69 | 68 |
| 70 // Returns TYPE_NONE on failure. | 69 // Returns TYPE_NONE on failure. |
| 71 static ToolType ToolNameToType(const base::StringPiece& str); | 70 static ToolType ToolNameToType(const base::StringPiece& str); |
| 72 static std::string ToolTypeToName(ToolType type); | 71 static std::string ToolTypeToName(ToolType type); |
| 73 | 72 |
| 74 // Returns null if the tool hasn't been defined. | 73 // Returns null if the tool hasn't been defined. |
| 75 const Tool* GetTool(ToolType type) const; | 74 const Tool* GetTool(ToolType type) const; |
| 76 | 75 |
| 77 // Set a tool. When all tools are configured, you should call | 76 // Set a tool. When all tools are configured, you should call |
| 78 // ToolchainSetupComplete(). | 77 // ToolchainSetupComplete(). |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 bool setup_complete_; | 120 bool setup_complete_; |
| 122 | 121 |
| 123 // Substitutions used by the tools in this toolchain. | 122 // Substitutions used by the tools in this toolchain. |
| 124 SubstitutionBits substitution_bits_; | 123 SubstitutionBits substitution_bits_; |
| 125 | 124 |
| 126 LabelTargetVector deps_; | 125 LabelTargetVector deps_; |
| 127 Scope::KeyValueMap args_; | 126 Scope::KeyValueMap args_; |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 #endif // TOOLS_GN_TOOLCHAIN_H_ | 129 #endif // TOOLS_GN_TOOLCHAIN_H_ |
| OLD | NEW |