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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // will return the stamp tool instead since the final output of a copy | 117 // will return the stamp tool instead since the final output of a copy |
118 // target is to stamp the set of copies done so there is one output. | 118 // target is to stamp the set of copies done so there is one output. |
119 static ToolType GetToolTypeForTargetFinalOutput(const Target* target); | 119 static ToolType GetToolTypeForTargetFinalOutput(const Target* target); |
120 const Tool* GetToolForTargetFinalOutput(const Target* target) const; | 120 const Tool* GetToolForTargetFinalOutput(const Target* target) const; |
121 | 121 |
122 const SubstitutionBits& substitution_bits() const { | 122 const SubstitutionBits& substitution_bits() const { |
123 DCHECK(setup_complete_); | 123 DCHECK(setup_complete_); |
124 return substitution_bits_; | 124 return substitution_bits_; |
125 } | 125 } |
126 | 126 |
127 void set_concurrent_links(int cl) { concurrent_links_ = cl; } | |
128 int concurrent_links() const { return concurrent_links_; } | |
129 | |
130 private: | 127 private: |
131 std::unique_ptr<Tool> tools_[TYPE_NUMTYPES]; | 128 std::unique_ptr<Tool> tools_[TYPE_NUMTYPES]; |
132 | 129 |
133 // How many links to run in parallel. Only the default toolchain's version of | |
134 // this variable applies. | |
135 int concurrent_links_; | |
136 | |
137 bool setup_complete_; | 130 bool setup_complete_; |
138 | 131 |
139 // Substitutions used by the tools in this toolchain. | 132 // Substitutions used by the tools in this toolchain. |
140 SubstitutionBits substitution_bits_; | 133 SubstitutionBits substitution_bits_; |
141 | 134 |
142 LabelTargetVector deps_; | 135 LabelTargetVector deps_; |
143 Scope::KeyValueMap args_; | 136 Scope::KeyValueMap args_; |
144 }; | 137 }; |
145 | 138 |
146 #endif // TOOLS_GN_TOOLCHAIN_H_ | 139 #endif // TOOLS_GN_TOOLCHAIN_H_ |
OLD | NEW |