| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 if (err->has_error()) | 120 if (err->has_error()) |
| 121 return; | 121 return; |
| 122 | 122 |
| 123 // Save this target for the file. | 123 // Save this target for the file. |
| 124 Scope::ItemVector* collector = scope->GetItemCollector(); | 124 Scope::ItemVector* collector = scope->GetItemCollector(); |
| 125 if (!collector) { | 125 if (!collector) { |
| 126 *err = Err(function_call, "Can't define a target in this context."); | 126 *err = Err(function_call, "Can't define a target in this context."); |
| 127 return; | 127 return; |
| 128 } | 128 } |
| 129 collector->push_back(new scoped_ptr<Item>(target.PassAs<Item>())); | 129 collector->push_back(target.release()); |
| 130 } | 130 } |
| 131 | 131 |
| 132 const BuildSettings* TargetGenerator::GetBuildSettings() const { | 132 const BuildSettings* TargetGenerator::GetBuildSettings() const { |
| 133 return scope_->settings()->build_settings(); | 133 return scope_->settings()->build_settings(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 bool TargetGenerator::FillSources() { | 136 bool TargetGenerator::FillSources() { |
| 137 const Value* value = scope_->GetValue(variables::kSources, true); | 137 const Value* value = scope_->GetValue(variables::kSources, true); |
| 138 if (!value) | 138 if (!value) |
| 139 return true; | 139 return true; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 bool TargetGenerator::FillForwardDependentConfigs() { | 337 bool TargetGenerator::FillForwardDependentConfigs() { |
| 338 const Value* value = scope_->GetValue( | 338 const Value* value = scope_->GetValue( |
| 339 variables::kForwardDependentConfigsFrom, true); | 339 variables::kForwardDependentConfigsFrom, true); |
| 340 if (value) { | 340 if (value) { |
| 341 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(), | 341 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(), |
| 342 ToolchainLabelForScope(scope_), | 342 ToolchainLabelForScope(scope_), |
| 343 &target_->forward_dependent_configs(), err_); | 343 &target_->forward_dependent_configs(), err_); |
| 344 } | 344 } |
| 345 return !err_->has_error(); | 345 return !err_->has_error(); |
| 346 } | 346 } |
| OLD | NEW |