| Index: tools/gn/config.cc
|
| diff --git a/tools/gn/config.cc b/tools/gn/config.cc
|
| index 5b89e2beb020d82ca179e6b866b5a49ae529960b..dce951f65b33384fec9403cb65176ef6354662d8 100644
|
| --- a/tools/gn/config.cc
|
| +++ b/tools/gn/config.cc
|
| @@ -6,8 +6,6 @@
|
|
|
| #include "tools/gn/err.h"
|
| #include "tools/gn/input_file_manager.h"
|
| -#include "tools/gn/item_node.h"
|
| -#include "tools/gn/item_tree.h"
|
| #include "tools/gn/scheduler.h"
|
|
|
| Config::Config(const Settings* settings, const Label& label)
|
| @@ -24,59 +22,3 @@ Config* Config::AsConfig() {
|
| const Config* Config::AsConfig() const {
|
| return this;
|
| }
|
| -
|
| -// static
|
| -Config* Config::GetConfig(const Settings* settings,
|
| - const LocationRange& specified_from_here,
|
| - const Label& label,
|
| - Item* dep_from,
|
| - Err* err) {
|
| - DCHECK(!label.is_null());
|
| -
|
| - ItemTree* tree = &settings->build_settings()->item_tree();
|
| - base::AutoLock lock(tree->lock());
|
| -
|
| - ItemNode* node = tree->GetExistingNodeLocked(label);
|
| - Config* config = NULL;
|
| - if (!node) {
|
| - config = new Config(settings, label);
|
| - node = new ItemNode(config);
|
| - node->set_originally_referenced_from_here(specified_from_here);
|
| - tree->AddNodeLocked(node);
|
| -
|
| - // Only schedule loading the given target if somebody is depending on it
|
| - // (and we optimize by not re-asking it to run the current file).
|
| - // Otherwise, we're probably generating it right now.
|
| - if (dep_from && dep_from->label().dir() != label.dir()) {
|
| - settings->build_settings()->toolchain_manager().ScheduleInvocationLocked(
|
| - specified_from_here, label.GetToolchainLabel(), label.dir(),
|
| - err);
|
| - }
|
| - } else if ((config = node->item()->AsConfig())) {
|
| - // Previously saw this item as a config.
|
| -
|
| - // If we have no dep_from, we're generating it. In this case, it had better
|
| - // not already be generated.
|
| - if (!dep_from && node->state() != ItemNode::REFERENCED) {
|
| - *err = Err(specified_from_here, "Duplicate config definition.",
|
| - "You already told me about a config with this name.");
|
| - return NULL;
|
| - }
|
| - } else {
|
| - // Previously saw this thing as a non-config.
|
| - *err = Err(specified_from_here,
|
| - "Config name already used.",
|
| - "Previously you specified a " +
|
| - node->item()->GetItemTypeName() + " with this name instead.");
|
| - return NULL;
|
| - }
|
| -
|
| - // Keep a record of the guy asking us for this dependency. We know if
|
| - // somebody is adding a dependency, that guy it himself not resolved.
|
| - if (dep_from) {
|
| - if (!dep_from->item_node()->AddDependency(
|
| - settings->build_settings(), specified_from_here, node, err))
|
| - return NULL;
|
| - }
|
| - return config;
|
| -}
|
|
|