Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1212)

Side by Side Diff: tools/gn/toolchain.h

Issue 2211593002: Cleanup references to concurrent_links in gn binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@concurrent_links
Patch Set: Fix unittests. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/ninja_build_writer_unittest.cc ('k') | tools/gn/toolchain.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « tools/gn/ninja_build_writer_unittest.cc ('k') | tools/gn/toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698