Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: tools/gn/loader.cc

Issue 2926013002: Support explicit pools in actions (Closed)
Patch Set: Support explicit pools in actions Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/loader.cc
diff --git a/tools/gn/loader.cc b/tools/gn/loader.cc
index 0ede3c95548389882fab5481a9f3ad532cb5e061..741b7e6bd2070629b2283a6f32500f6de0a040b2 100644
--- a/tools/gn/loader.cc
+++ b/tools/gn/loader.cc
@@ -10,14 +10,17 @@
#include "tools/gn/build_settings.h"
#include "tools/gn/err.h"
#include "tools/gn/filesystem_utils.h"
+#include "tools/gn/functions.h"
#include "tools/gn/input_file_manager.h"
#include "tools/gn/parse_tree.h"
+#include "tools/gn/pool.h"
#include "tools/gn/scheduler.h"
#include "tools/gn/scope_per_file_provider.h"
#include "tools/gn/settings.h"
#include "tools/gn/source_dir.h"
#include "tools/gn/source_file.h"
#include "tools/gn/trace.h"
+#include "tools/gn/variables.h"
namespace {
@@ -339,6 +342,14 @@ void LoaderImpl::BackgroundLoadBuildConfig(
}
}
+ // Create the predefined console pool object.
brettw 2017/06/28 21:23:27 This seems weird to me. It looks like this will be
Petr Hosek 2017/06/28 23:42:32 It has "//:console" label but it's accessible thro
+ Label label(MakeLabelForScope(base_config, nullptr, "console"));
+ std::unique_ptr<Pool> pool(new Pool(base_config->settings(), label));
+ pool->set_console(true);
+ Value console_val(nullptr, label.GetUserVisibleName(true));
+ base_config->SetValue(variables::kConsole, console_val, nullptr);
+ settings->build_settings()->ItemDefined(std::move(pool));
+
task_runner_->PostTask(FROM_HERE,
base::Bind(&LoaderImpl::DidLoadBuildConfig, this,
settings->toolchain_label()));

Powered by Google App Engine
This is Rietveld 408576698