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

Side by Side Diff: tools/gn/target_generator.cc

Issue 283883002: Remove the hard_dep flag in GN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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_generator.h" 5 #include "tools/gn/target_generator.h"
6 6
7 #include "tools/gn/action_target_generator.h" 7 #include "tools/gn/action_target_generator.h"
8 #include "tools/gn/binary_target_generator.h" 8 #include "tools/gn/binary_target_generator.h"
9 #include "tools/gn/build_settings.h" 9 #include "tools/gn/build_settings.h"
10 #include "tools/gn/config.h" 10 #include "tools/gn/config.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return; 201 return;
202 FillGenericDeps(variables::kDatadeps, &target_->datadeps()); 202 FillGenericDeps(variables::kDatadeps, &target_->datadeps());
203 if (err_->has_error()) 203 if (err_->has_error())
204 return; 204 return;
205 205
206 // This is a list of dependent targets to have their configs fowarded, so 206 // This is a list of dependent targets to have their configs fowarded, so
207 // it goes here rather than in FillConfigs. 207 // it goes here rather than in FillConfigs.
208 FillForwardDependentConfigs(); 208 FillForwardDependentConfigs();
209 if (err_->has_error()) 209 if (err_->has_error())
210 return; 210 return;
211
212 // Mark the "hard_dep" variable as used. This was previously part of GN but
213 // is now unused, and we don't want to throw errors for build files setting
214 // it while the new binary is being pushed.
215 // TODO(brettw) remove this code when all hard_deps are removed.
216 const char kHardDep[] = "hard_dep";
217 if (scope_->IsSetButUnused(kHardDep))
218 scope_->MarkUsed(kHardDep);
219 } 211 }
220 212
221 void TargetGenerator::FillOutputs() { 213 void TargetGenerator::FillOutputs() {
222 const Value* value = scope_->GetValue(variables::kOutputs, true); 214 const Value* value = scope_->GetValue(variables::kOutputs, true);
223 if (!value) 215 if (!value)
224 return; 216 return;
225 217
226 Target::FileList outputs; 218 Target::FileList outputs;
227 if (!ExtractListOfRelativeFiles(scope_->settings()->build_settings(), *value, 219 if (!ExtractListOfRelativeFiles(scope_->settings()->build_settings(), *value,
228 scope_->GetSourceDir(), &outputs, err_)) 220 scope_->GetSourceDir(), &outputs, err_))
(...skipping 30 matching lines...) Expand all
259 251
260 void TargetGenerator::FillForwardDependentConfigs() { 252 void TargetGenerator::FillForwardDependentConfigs() {
261 const Value* value = scope_->GetValue( 253 const Value* value = scope_->GetValue(
262 variables::kForwardDependentConfigsFrom, true); 254 variables::kForwardDependentConfigsFrom, true);
263 if (value) { 255 if (value) {
264 ExtractListOfLabels(*value, scope_->GetSourceDir(), 256 ExtractListOfLabels(*value, scope_->GetSourceDir(),
265 ToolchainLabelForScope(scope_), 257 ToolchainLabelForScope(scope_),
266 &target_->forward_dependent_configs(), err_); 258 &target_->forward_dependent_configs(), err_);
267 } 259 }
268 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698