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

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

Issue 1750283003: Minor fixes to tools/gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix last reference to IsValidToolSubstutition. Created 4 years, 9 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
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 "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // pass in other settings. 92 // pass in other settings.
93 Scope::KeyValueMap& args() { return args_; } 93 Scope::KeyValueMap& args() { return args_; }
94 const Scope::KeyValueMap& args() const { return args_; } 94 const Scope::KeyValueMap& args() const { return args_; }
95 95
96 // Returns the tool for compiling the given source file type. 96 // Returns the tool for compiling the given source file type.
97 static ToolType GetToolTypeForSourceType(SourceFileType type); 97 static ToolType GetToolTypeForSourceType(SourceFileType type);
98 const Tool* GetToolForSourceType(SourceFileType type); 98 const Tool* GetToolForSourceType(SourceFileType type);
99 99
100 // Returns the tool that produces the final output for the given target type. 100 // Returns the tool that produces the final output for the given target type.
101 // This isn't necessarily the tool you would expect. For copy target, this 101 // This isn't necessarily the tool you would expect. For copy target, this
102 // will return the stamp tool ionstead since the final output of a copy 102 // will return the stamp tool instead since the final output of a copy
103 // target is to stamp the set of copies done so there is one output. 103 // target is to stamp the set of copies done so there is one output.
104 static ToolType GetToolTypeForTargetFinalOutput(const Target* target); 104 static ToolType GetToolTypeForTargetFinalOutput(const Target* target);
105 const Tool* GetToolForTargetFinalOutput(const Target* target) const; 105 const Tool* GetToolForTargetFinalOutput(const Target* target) const;
106 106
107 const SubstitutionBits& substitution_bits() const { 107 const SubstitutionBits& substitution_bits() const {
108 DCHECK(setup_complete_); 108 DCHECK(setup_complete_);
109 return substitution_bits_; 109 return substitution_bits_;
110 } 110 }
111 111
112 void set_concurrent_links(int cl) { concurrent_links_ = cl; } 112 void set_concurrent_links(int cl) { concurrent_links_ = cl; }
113 int concurrent_links() const { return concurrent_links_; } 113 int concurrent_links() const { return concurrent_links_; }
114 114
115 private: 115 private:
116 scoped_ptr<Tool> tools_[TYPE_NUMTYPES]; 116 scoped_ptr<Tool> tools_[TYPE_NUMTYPES];
117 117
118 // How many links to run in parallel. Only the default toolchain's version of 118 // How many links to run in parallel. Only the default toolchain's version of
119 // this variable applies. 119 // this variable applies.
120 int concurrent_links_; 120 int concurrent_links_;
121 121
122 bool setup_complete_; 122 bool setup_complete_;
123 123
124 // Substitutions used by the tools in this toolchain. 124 // Substitutions used by the tools in this toolchain.
125 SubstitutionBits substitution_bits_; 125 SubstitutionBits substitution_bits_;
126 126
127 LabelTargetVector deps_; 127 LabelTargetVector deps_;
128 Scope::KeyValueMap args_; 128 Scope::KeyValueMap args_;
129 }; 129 };
130 130
131 #endif // TOOLS_GN_TOOLCHAIN_H_ 131 #endif // TOOLS_GN_TOOLCHAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698