| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 static const char* kToolAsm; | 59 static const char* kToolAsm; |
| 60 static const char* kToolAlink; | 60 static const char* kToolAlink; |
| 61 static const char* kToolSolink; | 61 static const char* kToolSolink; |
| 62 static const char* kToolSolinkModule; | 62 static const char* kToolSolinkModule; |
| 63 static const char* kToolLink; | 63 static const char* kToolLink; |
| 64 static const char* kToolStamp; | 64 static const char* kToolStamp; |
| 65 static const char* kToolCopy; | 65 static const char* kToolCopy; |
| 66 static const char* kToolCopyBundleData; | 66 static const char* kToolCopyBundleData; |
| 67 static const char* kToolCompileXCAssets; | 67 static const char* kToolCompileXCAssets; |
| 68 | 68 |
| 69 // The Settings of an Item is always the context in which the Item was |
| 70 // defined. For a toolchain this is confusing because this is NOT the |
| 71 // settings object that applies to the things in the toolchain. |
| 72 // |
| 73 // To get the Settings object corresponding to objects loaded in the context |
| 74 // of this toolchain (probably what you want instead), see |
| 75 // Loader::GetToolchainSettings(). Many toolchain objects may be created in a |
| 76 // given build, but only a few might be used, and the Loader is in charge of |
| 77 // this process. |
| 69 Toolchain(const Settings* settings, const Label& label); | 78 Toolchain(const Settings* settings, const Label& label); |
| 70 ~Toolchain() override; | 79 ~Toolchain() override; |
| 71 | 80 |
| 72 // Item overrides. | 81 // Item overrides. |
| 73 Toolchain* AsToolchain() override; | 82 Toolchain* AsToolchain() override; |
| 74 const Toolchain* AsToolchain() const override; | 83 const Toolchain* AsToolchain() const override; |
| 75 | 84 |
| 76 // Returns TYPE_NONE on failure. | 85 // Returns TYPE_NONE on failure. |
| 77 static ToolType ToolNameToType(const base::StringPiece& str); | 86 static ToolType ToolNameToType(const base::StringPiece& str); |
| 78 static std::string ToolTypeToName(ToolType type); | 87 static std::string ToolTypeToName(ToolType type); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 bool setup_complete_; | 137 bool setup_complete_; |
| 129 | 138 |
| 130 // Substitutions used by the tools in this toolchain. | 139 // Substitutions used by the tools in this toolchain. |
| 131 SubstitutionBits substitution_bits_; | 140 SubstitutionBits substitution_bits_; |
| 132 | 141 |
| 133 LabelTargetVector deps_; | 142 LabelTargetVector deps_; |
| 134 Scope::KeyValueMap args_; | 143 Scope::KeyValueMap args_; |
| 135 }; | 144 }; |
| 136 | 145 |
| 137 #endif // TOOLS_GN_TOOLCHAIN_H_ | 146 #endif // TOOLS_GN_TOOLCHAIN_H_ |
| OLD | NEW |