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

Unified Diff: tools/gn/action_target_generator.cc

Issue 2926013002: Support explicit pools in actions (Closed)
Patch Set: Remove console altogether 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
« no previous file with comments | « tools/gn/action_target_generator.h ('k') | tools/gn/action_values.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/action_target_generator.cc
diff --git a/tools/gn/action_target_generator.cc b/tools/gn/action_target_generator.cc
index b7efa43f900639c81fb426596af565b2555abc87..52d64ac95db0e4e8050332841e9abf3a82cd6687 100644
--- a/tools/gn/action_target_generator.cc
+++ b/tools/gn/action_target_generator.cc
@@ -8,6 +8,7 @@
#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/parse_tree.h"
#include "tools/gn/scope.h"
#include "tools/gn/value.h"
@@ -58,7 +59,7 @@ void ActionTargetGenerator::DoRun() {
if (!FillDepfile())
return;
- if (!FillConsole())
+ if (!FillPool())
return;
if (!FillCheckIncludes())
@@ -159,13 +160,20 @@ bool ActionTargetGenerator::FillDepfile() {
return true;
}
-bool ActionTargetGenerator::FillConsole() {
- const Value* value = scope_->GetValue(variables::kConsole, true);
+bool ActionTargetGenerator::FillPool() {
+ const Value* value = scope_->GetValue(variables::kPool, true);
if (!value)
return true;
- if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
+
+ Label label = Label::Resolve(scope_->GetSourceDir(),
+ ToolchainLabelForScope(scope_), *value, err_);
+ if (err_->has_error())
return false;
- target_->action_values().set_console(value->boolean_value());
+
+ LabelPtrPair<Pool> pair(label);
+ pair.origin = target_->defined_from();
+
+ target_->action_values().set_pool(std::move(pair));
return true;
}
« no previous file with comments | « tools/gn/action_target_generator.h ('k') | tools/gn/action_values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698