OLD | NEW |
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 CHECK(outputs.size() == value->list_value().size()); | 232 CHECK(outputs.size() == value->list_value().size()); |
233 for (size_t i = 0; i < outputs.size(); i++) { | 233 for (size_t i = 0; i < outputs.size(); i++) { |
234 if (!EnsureStringIsInOutputDir( | 234 if (!EnsureStringIsInOutputDir( |
235 GetBuildSettings()->build_dir(), | 235 GetBuildSettings()->build_dir(), |
236 outputs[i], value->list_value()[i], allow_templates, err_)) | 236 outputs[i], value->list_value()[i], allow_templates, err_)) |
237 return; | 237 return; |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 void TargetGenerator::FillGenericConfigs(const char* var_name, | 241 void TargetGenerator::FillGenericConfigs(const char* var_name, |
242 LabelConfigVector* dest) { | 242 UniqueVector<LabelConfigPair>* dest) { |
243 const Value* value = scope_->GetValue(var_name, true); | 243 const Value* value = scope_->GetValue(var_name, true); |
244 if (value) { | 244 if (value) { |
245 ExtractListOfLabels(*value, scope_->GetSourceDir(), | 245 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(), |
246 ToolchainLabelForScope(scope_), dest, err_); | 246 ToolchainLabelForScope(scope_), dest, err_); |
247 } | 247 } |
248 } | 248 } |
249 | 249 |
250 void TargetGenerator::FillGenericDeps(const char* var_name, | 250 void TargetGenerator::FillGenericDeps(const char* var_name, |
251 LabelTargetVector* dest) { | 251 LabelTargetVector* dest) { |
252 const Value* value = scope_->GetValue(var_name, true); | 252 const Value* value = scope_->GetValue(var_name, true); |
253 if (value) { | 253 if (value) { |
254 ExtractListOfLabels(*value, scope_->GetSourceDir(), | 254 ExtractListOfLabels(*value, scope_->GetSourceDir(), |
255 ToolchainLabelForScope(scope_), dest, err_); | 255 ToolchainLabelForScope(scope_), dest, err_); |
256 } | 256 } |
257 } | 257 } |
258 | 258 |
259 void TargetGenerator::FillForwardDependentConfigs() { | 259 void TargetGenerator::FillForwardDependentConfigs() { |
260 const Value* value = scope_->GetValue( | 260 const Value* value = scope_->GetValue( |
261 variables::kForwardDependentConfigsFrom, true); | 261 variables::kForwardDependentConfigsFrom, true); |
262 if (value) { | 262 if (value) { |
263 ExtractListOfLabels(*value, scope_->GetSourceDir(), | 263 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(), |
264 ToolchainLabelForScope(scope_), | 264 ToolchainLabelForScope(scope_), |
265 &target_->forward_dependent_configs(), err_); | 265 &target_->forward_dependent_configs(), err_); |
266 } | 266 } |
267 } | 267 } |
OLD | NEW |