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

Side by Side Diff: trunk/src/tools/gn/target.cc

Issue 46313006: Revert 232657 "GN: toolchain threading cleanup" (Closed) Base URL: svn://svn.chromium.org/chrome/
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 | « trunk/src/tools/gn/target.h ('k') | trunk/src/tools/gn/target_unittest.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 #include "tools/gn/target.h" 5 #include "tools/gn/target.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "tools/gn/config_values_extractors.h" 8 #include "tools/gn/config_values_extractors.h"
9 #include "tools/gn/scheduler.h" 9 #include "tools/gn/scheduler.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // One we haven't seen yet, also apply it to ourselves. 50 // One we haven't seen yet, also apply it to ourselves.
51 dest->push_back(all[i]); 51 dest->push_back(all[i]);
52 unique_configs->insert(all[i].ptr); 52 unique_configs->insert(all[i].ptr);
53 } 53 }
54 } 54 }
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 Target::Target(const Settings* settings, const Label& label) 59 Target::Target(const Settings* settings, const Label& label)
60 : Item(settings, label), 60 : Item(label),
61 settings_(settings),
61 output_type_(UNKNOWN), 62 output_type_(UNKNOWN),
62 hard_dep_(false), 63 hard_dep_(false),
63 external_(false), 64 external_(false),
64 generated_(false), 65 generated_(false),
65 generator_function_(NULL) { 66 generator_function_(NULL) {
66 } 67 }
67 68
68 Target::~Target() { 69 Target::~Target() {
69 } 70 }
70 71
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (output_type_ != GROUP) { 148 if (output_type_ != GROUP) {
148 // Don't pull target info like libraries and configs from dependencies into 149 // Don't pull target info like libraries and configs from dependencies into
149 // a group target. When A depends on a group G, the G's dependents will 150 // a group target. When A depends on a group G, the G's dependents will
150 // be treated as direct dependencies of A, so this is unnecessary and will 151 // be treated as direct dependencies of A, so this is unnecessary and will
151 // actually result in duplicated settings (since settings will also be 152 // actually result in duplicated settings (since settings will also be
152 // pulled from G to A in case G has configs directly on it). 153 // pulled from G to A in case G has configs directly on it).
153 PullDependentTargetInfo(&unique_configs); 154 PullDependentTargetInfo(&unique_configs);
154 } 155 }
155 156
156 // Mark as resolved. 157 // Mark as resolved.
157 if (!settings()->build_settings()->target_resolved_callback().is_null()) { 158 if (!settings_->build_settings()->target_resolved_callback().is_null()) {
158 g_scheduler->ScheduleWork(base::Bind(&TargetResolvedThunk, 159 g_scheduler->ScheduleWork(base::Bind(&TargetResolvedThunk,
159 settings()->build_settings()->target_resolved_callback(), 160 settings_->build_settings()->target_resolved_callback(),
160 this)); 161 this));
161 } 162 }
162 } 163 }
163 164
164 bool Target::HasBeenGenerated() const { 165 bool Target::HasBeenGenerated() const {
165 return generated_; 166 return generated_;
166 } 167 }
167 168
168 void Target::SetGenerated(const Token* token) { 169 void Target::SetGenerated(const Token* token) {
169 DCHECK(!generated_); 170 DCHECK(!generated_);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // don't need to bother copying to our configs, only forwarding. 216 // don't need to bother copying to our configs, only forwarding.
216 DCHECK(std::find_if(deps_.begin(), deps_.end(), 217 DCHECK(std::find_if(deps_.begin(), deps_.end(),
217 LabelPtrPtrEquals<Target>(from_target)) != 218 LabelPtrPtrEquals<Target>(from_target)) !=
218 deps_.end()); 219 deps_.end());
219 direct_dependent_configs_.insert( 220 direct_dependent_configs_.insert(
220 direct_dependent_configs_.end(), 221 direct_dependent_configs_.end(),
221 from_target->direct_dependent_configs().begin(), 222 from_target->direct_dependent_configs().begin(),
222 from_target->direct_dependent_configs().end()); 223 from_target->direct_dependent_configs().end());
223 } 224 }
224 } 225 }
OLDNEW
« no previous file with comments | « trunk/src/tools/gn/target.h ('k') | trunk/src/tools/gn/target_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698