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/functions.h" | 5 #include "tools/gn/functions.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 return Value(); | 222 return Value(); |
223 | 223 |
224 Label label(MakeLabelForScope(scope, function, args[0].string_value())); | 224 Label label(MakeLabelForScope(scope, function, args[0].string_value())); |
225 | 225 |
226 if (g_scheduler->verbose_logging()) | 226 if (g_scheduler->verbose_logging()) |
227 g_scheduler->Log("Defining config", label.GetUserVisibleName(true)); | 227 g_scheduler->Log("Defining config", label.GetUserVisibleName(true)); |
228 | 228 |
229 // Create the new config. | 229 // Create the new config. |
230 scoped_ptr<Config> config(new Config(scope->settings(), label)); | 230 scoped_ptr<Config> config(new Config(scope->settings(), label)); |
231 config->set_defined_from(function); | 231 config->set_defined_from(function); |
| 232 if (!Visibility::FillItemVisibility(config.get(), scope, err)) |
| 233 return Value(); |
232 | 234 |
233 // Fill it. | 235 // Fill it. |
234 const SourceDir& input_dir = scope->GetSourceDir(); | 236 const SourceDir& input_dir = scope->GetSourceDir(); |
235 ConfigValuesGenerator gen(&config->config_values(), scope, input_dir, err); | 237 ConfigValuesGenerator gen(&config->config_values(), scope, input_dir, err); |
236 gen.Run(); | 238 gen.Run(); |
237 if (err->has_error()) | 239 if (err->has_error()) |
238 return Value(); | 240 return Value(); |
239 | 241 |
240 // Mark as complete. | 242 // Mark as complete. |
241 scope->settings()->build_settings()->ItemDefined(config.PassAs<Item>()); | 243 scope->settings()->build_settings()->ItemDefined(config.PassAs<Item>()); |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 return found_function->second.executed_block_runner( | 674 return found_function->second.executed_block_runner( |
673 function, args.list_value(), &block_scope, err); | 675 function, args.list_value(), &block_scope, err); |
674 } | 676 } |
675 | 677 |
676 // Otherwise it's a no-block function. | 678 // Otherwise it's a no-block function. |
677 return found_function->second.no_block_runner(scope, function, | 679 return found_function->second.no_block_runner(scope, function, |
678 args.list_value(), err); | 680 args.list_value(), err); |
679 } | 681 } |
680 | 682 |
681 } // namespace functions | 683 } // namespace functions |
OLD | NEW |