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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 176 } |
177 | 177 |
178 bool TargetGenerator::FillConfigs() { | 178 bool TargetGenerator::FillConfigs() { |
179 return FillGenericConfigs(variables::kConfigs, &target_->configs()); | 179 return FillGenericConfigs(variables::kConfigs, &target_->configs()); |
180 } | 180 } |
181 | 181 |
182 bool TargetGenerator::FillDependentConfigs() { | 182 bool TargetGenerator::FillDependentConfigs() { |
183 if (!FillGenericConfigs(variables::kAllDependentConfigs, | 183 if (!FillGenericConfigs(variables::kAllDependentConfigs, |
184 &target_->all_dependent_configs())) | 184 &target_->all_dependent_configs())) |
185 return false; | 185 return false; |
| 186 |
186 if (!FillGenericConfigs(variables::kPublicConfigs, | 187 if (!FillGenericConfigs(variables::kPublicConfigs, |
187 &target_->public_configs())) | 188 &target_->public_configs())) |
188 return false; | 189 return false; |
189 | 190 |
190 // "public_configs" was previously named "direct_dependent_configs", fall | |
191 // back to that if public_configs was undefined. | |
192 if (!scope_->GetValue(variables::kPublicConfigs, false)) { | |
193 if (!FillGenericConfigs("direct_dependent_configs", | |
194 &target_->public_configs())) | |
195 return false; | |
196 } | |
197 return true; | 191 return true; |
198 } | 192 } |
199 | 193 |
200 bool TargetGenerator::FillData() { | 194 bool TargetGenerator::FillData() { |
201 const Value* value = scope_->GetValue(variables::kData, true); | 195 const Value* value = scope_->GetValue(variables::kData, true); |
202 if (!value) | 196 if (!value) |
203 return true; | 197 return true; |
204 if (!value->VerifyTypeIs(Value::LIST, err_)) | 198 if (!value->VerifyTypeIs(Value::LIST, err_)) |
205 return false; | 199 return false; |
206 | 200 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 bool TargetGenerator::FillForwardDependentConfigs() { | 363 bool TargetGenerator::FillForwardDependentConfigs() { |
370 const Value* value = scope_->GetValue( | 364 const Value* value = scope_->GetValue( |
371 variables::kForwardDependentConfigsFrom, true); | 365 variables::kForwardDependentConfigsFrom, true); |
372 if (value) { | 366 if (value) { |
373 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(), | 367 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(), |
374 ToolchainLabelForScope(scope_), | 368 ToolchainLabelForScope(scope_), |
375 &target_->forward_dependent_configs(), err_); | 369 &target_->forward_dependent_configs(), err_); |
376 } | 370 } |
377 return !err_->has_error(); | 371 return !err_->has_error(); |
378 } | 372 } |
OLD | NEW |