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

Unified Diff: tools/gn/setup.cc

Issue 2824153002: Use $root:default as a "default" rule (Closed)
Patch Set: Code review feedback Created 3 years, 8 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/ninja_build_writer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/setup.cc
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index 2c2ba38526a3bf831b0ce37ef7e20b84f8aed5ec..22f4fcecef618013b55d8ad30fa21ddc1190e638 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -698,6 +698,7 @@ bool Setup::RunConfigFile() {
bool Setup::FillOtherConfig(const base::CommandLine& cmdline) {
Err err;
SourceDir current_dir("//");
+ Label root_target_label(current_dir, "");
// Secondary source path, read from the config file if present.
// Read from the config file if present.
@@ -720,8 +721,7 @@ bool Setup::FillOtherConfig(const base::CommandLine& cmdline) {
return false;
}
- Label root_target_label =
- Label::Resolve(current_dir, Label(), *root_value, &err);
+ root_target_label = Label::Resolve(current_dir, Label(), *root_value, &err);
if (err.has_error()) {
err.PrintToStdout();
return false;
@@ -729,6 +729,7 @@ bool Setup::FillOtherConfig(const base::CommandLine& cmdline) {
root_build_file_ = Loader::BuildFileForLabel(root_target_label);
}
+ build_settings_.SetRootTargetLabel(root_target_label);
// Build config file.
const Value* build_config_value =
« no previous file with comments | « tools/gn/ninja_build_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698