From 556b7ded9278664fe8b2e7209c5799e6874fd5f6 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Fri, 2 Aug 2013 17:58:38 +0000 Subject: Support for non-greedy mode. Previously when we encountered a target declaration, we would always recursively load the deps and write the build file for that target. This is "greedy mode." This patch adds a non-greedy mode where a "should generate" but is pushed recursively through the dependency tree. In this mode, targets without the bit set will not have their dependencies loaded, and will not have buildfiles written to disk. The current implementation sets greedy mode for the default toolchain, and non-greed mode for alternate toolchains. The reasoning is that because a target depends on something in another toolchain, we don't want to do an entire build in that alternate toolchain, but just do the minimum dependencies in that alternate toolchain. R=scottmg@chromium.org Review URL: https://codereview.chromium.org/21133014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215319 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/gn/settings.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/gn/settings.cc') diff --git a/tools/gn/settings.cc b/tools/gn/settings.cc index 82014a7..50eee73 100644 --- a/tools/gn/settings.cc +++ b/tools/gn/settings.cc @@ -14,7 +14,8 @@ Settings::Settings(const BuildSettings* build_settings, toolchain_(toolchain), target_os_(WIN), // FIXME(brettw) set this properly. import_manager_(), - base_config_(this) { + base_config_(this), + greedy_target_generation_(false) { DCHECK(output_subdir_name.find('/') == std::string::npos); if (output_subdir_name.empty()) { toolchain_output_dir_ = build_settings->build_dir(); -- cgit v1.1