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

Unified Diff: tools/gn/setup.cc

Issue 2824153002: Use $root:default as a "default" rule (Closed)
Patch Set: Update the documentation 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
« tools/gn/ninja_build_writer.cc ('K') | « 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..6f23a997dc0cf5c29ccd2b51d414d17b7b48478f 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -95,7 +95,7 @@ Variables
root [optional]
Label of the root build target. The GN build will start by loading the
- build file containing this target name. This defaults to "//:" which will
+ build file containing this target name. This defaults to label which will
brettw 2017/04/19 19:49:25 This new text isn't gramatical. I think the old te
Petr Hosek 2017/04/19 20:20:26 Done.
Dirk Pranke 2017/04/19 23:01:27 FWIW, I still find it confusing.
cause the file //BUILD.gn to be loaded.
secondary_source [optional]
@@ -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 =
« tools/gn/ninja_build_writer.cc ('K') | « tools/gn/ninja_build_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698