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

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

Issue 1375023003: tools/gn: Remove code for forward_dependent_configs_from variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forward_dependent_configs Created 5 years, 2 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 #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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 if (!FillGenericDeps(variables::kDataDeps, &target_->data_deps())) 240 if (!FillGenericDeps(variables::kDataDeps, &target_->data_deps()))
241 return false; 241 return false;
242 242
243 // "data_deps" was previously named "datadeps". For backwards-compat, read 243 // "data_deps" was previously named "datadeps". For backwards-compat, read
244 // the old one if no "data_deps" were specified. 244 // the old one if no "data_deps" were specified.
245 if (!scope_->GetValue(variables::kDataDeps, false)) { 245 if (!scope_->GetValue(variables::kDataDeps, false)) {
246 if (!FillGenericDeps("datadeps", &target_->data_deps())) 246 if (!FillGenericDeps("datadeps", &target_->data_deps()))
247 return false; 247 return false;
248 } 248 }
249 249
250 // This is a list of dependent targets to have their configs fowarded, so
251 // it goes here rather than in FillConfigs.
252 if (!FillForwardDependentConfigs())
253 return false;
254 return true; 250 return true;
255 } 251 }
256 252
257 bool TargetGenerator::FillTestonly() { 253 bool TargetGenerator::FillTestonly() {
258 const Value* value = scope_->GetValue(variables::kTestonly, true); 254 const Value* value = scope_->GetValue(variables::kTestonly, true);
259 if (value) { 255 if (value) {
260 if (!value->VerifyTypeIs(Value::BOOLEAN, err_)) 256 if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
261 return false; 257 return false;
262 target_->set_testonly(value->boolean_value()); 258 target_->set_testonly(value->boolean_value());
263 } 259 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 348
353 bool TargetGenerator::FillGenericDeps(const char* var_name, 349 bool TargetGenerator::FillGenericDeps(const char* var_name,
354 LabelTargetVector* dest) { 350 LabelTargetVector* dest) {
355 const Value* value = scope_->GetValue(var_name, true); 351 const Value* value = scope_->GetValue(var_name, true);
356 if (value) { 352 if (value) {
357 ExtractListOfLabels(*value, scope_->GetSourceDir(), 353 ExtractListOfLabels(*value, scope_->GetSourceDir(),
358 ToolchainLabelForScope(scope_), dest, err_); 354 ToolchainLabelForScope(scope_), dest, err_);
359 } 355 }
360 return !err_->has_error(); 356 return !err_->has_error();
361 } 357 }
362
363 bool TargetGenerator::FillForwardDependentConfigs() {
364 const Value* value = scope_->GetValue(
365 variables::kForwardDependentConfigsFrom, true);
366 if (value) {
367 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(),
368 ToolchainLabelForScope(scope_),
369 &target_->forward_dependent_configs(), err_);
370 }
371 return !err_->has_error();
372 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698