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

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

Issue 51693002: GN: toolchain threading cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/setup.cc ('k') | tools/gn/target.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_TARGET_H_ 5 #ifndef TOOLS_GN_TARGET_H_
6 #define TOOLS_GN_TARGET_H_ 6 #define TOOLS_GN_TARGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual const Target* AsTarget() const OVERRIDE; 51 virtual const Target* AsTarget() const OVERRIDE;
52 virtual void OnResolved() OVERRIDE; 52 virtual void OnResolved() OVERRIDE;
53 53
54 // This flag indicates if we've run the TargetGenerator for this target to 54 // This flag indicates if we've run the TargetGenerator for this target to
55 // fill out the rest of the values. Once we've done this, we save the 55 // fill out the rest of the values. Once we've done this, we save the
56 // location of the function that started the generating so that we can detect 56 // location of the function that started the generating so that we can detect
57 // duplicate declarations. 57 // duplicate declarations.
58 bool HasBeenGenerated() const; 58 bool HasBeenGenerated() const;
59 void SetGenerated(const Token* token); 59 void SetGenerated(const Token* token);
60 60
61 const Settings* settings() const { return settings_; }
62
63 OutputType output_type() const { return output_type_; } 61 OutputType output_type() const { return output_type_; }
64 void set_output_type(OutputType t) { output_type_ = t; } 62 void set_output_type(OutputType t) { output_type_ = t; }
65 63
66 bool IsLinkable() const; 64 bool IsLinkable() const;
67 65
68 // Will be the empty string to use the target label as the output name. 66 // Will be the empty string to use the target label as the output name.
69 const std::string& output_name() const { return output_name_; } 67 const std::string& output_name() const { return output_name_; }
70 void set_output_name(const std::string& name) { output_name_ = name; } 68 void set_output_name(const std::string& name) { output_name_ = name; }
71 69
72 const FileList& sources() const { return sources_; } 70 const FileList& sources() const { return sources_; }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const OrderedSet<std::string>& all_libs() const { return all_libs_; } 140 const OrderedSet<std::string>& all_libs() const { return all_libs_; }
143 141
144 const SourceFile& gyp_file() const { return gyp_file_; } 142 const SourceFile& gyp_file() const { return gyp_file_; }
145 void set_gyp_file(const SourceFile& gf) { gyp_file_ = gf; } 143 void set_gyp_file(const SourceFile& gf) { gyp_file_ = gf; }
146 144
147 private: 145 private:
148 // Pulls necessary information from dependents to this one when all 146 // Pulls necessary information from dependents to this one when all
149 // dependencies have been resolved. 147 // dependencies have been resolved.
150 void PullDependentTargetInfo(std::set<const Config*>* unique_configs); 148 void PullDependentTargetInfo(std::set<const Config*>* unique_configs);
151 149
152 const Settings* settings_;
153 OutputType output_type_; 150 OutputType output_type_;
154 std::string output_name_; 151 std::string output_name_;
155 152
156 FileList sources_; 153 FileList sources_;
157 FileList source_prereqs_; 154 FileList source_prereqs_;
158 FileList data_; 155 FileList data_;
159 156
160 bool hard_dep_; 157 bool hard_dep_;
161 158
162 // Note that if there are any groups in the deps, once the target is resolved 159 // Note that if there are any groups in the deps, once the target is resolved
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 192
196 SourceFile gyp_file_; 193 SourceFile gyp_file_;
197 194
198 bool generated_; 195 bool generated_;
199 const Token* generator_function_; // Who generated this: for error messages. 196 const Token* generator_function_; // Who generated this: for error messages.
200 197
201 DISALLOW_COPY_AND_ASSIGN(Target); 198 DISALLOW_COPY_AND_ASSIGN(Target);
202 }; 199 };
203 200
204 #endif // TOOLS_GN_TARGET_H_ 201 #endif // TOOLS_GN_TARGET_H_
OLDNEW
« no previous file with comments | « tools/gn/setup.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698