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" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // will return the stamp tool ionstead since the final output of a copy | 101 // will return the stamp tool ionstead since the final output of a copy |
102 // target is to stamp the set of copies done so there is one output. | 102 // target is to stamp the set of copies done so there is one output. |
103 static ToolType GetToolTypeForTargetFinalOutput(const Target* target); | 103 static ToolType GetToolTypeForTargetFinalOutput(const Target* target); |
104 const Tool* GetToolForTargetFinalOutput(const Target* target) const; | 104 const Tool* GetToolForTargetFinalOutput(const Target* target) const; |
105 | 105 |
106 const SubstitutionBits& substitution_bits() const { | 106 const SubstitutionBits& substitution_bits() const { |
107 DCHECK(setup_complete_); | 107 DCHECK(setup_complete_); |
108 return substitution_bits_; | 108 return substitution_bits_; |
109 } | 109 } |
110 | 110 |
| 111 void set_concurrent_links(int cl) { concurrent_links_ = cl; } |
| 112 int concurrent_links() const { return concurrent_links_; } |
| 113 |
111 private: | 114 private: |
112 scoped_ptr<Tool> tools_[TYPE_NUMTYPES]; | 115 scoped_ptr<Tool> tools_[TYPE_NUMTYPES]; |
113 | 116 |
| 117 // How many links to run in parallel. Only the default toolchain's version of |
| 118 // this variable applies. |
| 119 int concurrent_links_; |
| 120 |
114 bool setup_complete_; | 121 bool setup_complete_; |
115 | 122 |
116 // Substitutions used by the tools in this toolchain. | 123 // Substitutions used by the tools in this toolchain. |
117 SubstitutionBits substitution_bits_; | 124 SubstitutionBits substitution_bits_; |
118 | 125 |
119 LabelTargetVector deps_; | 126 LabelTargetVector deps_; |
120 Scope::KeyValueMap args_; | 127 Scope::KeyValueMap args_; |
121 }; | 128 }; |
122 | 129 |
123 #endif // TOOLS_GN_TOOLCHAIN_H_ | 130 #endif // TOOLS_GN_TOOLCHAIN_H_ |
OLD | NEW |