summaryrefslogtreecommitdiffstats
path: root/tools/gn/settings.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-02 17:58:38 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-02 17:58:38 +0000
commit556b7ded9278664fe8b2e7209c5799e6874fd5f6 (patch)
tree863881dc7995e7191863e392d5389711c64f7d7e /tools/gn/settings.cc
parentc3a2c6e6264f59e2aee7f8598f97c4d10e78054e (diff)
downloadchromium_src-556b7ded9278664fe8b2e7209c5799e6874fd5f6.zip
chromium_src-556b7ded9278664fe8b2e7209c5799e6874fd5f6.tar.gz
chromium_src-556b7ded9278664fe8b2e7209c5799e6874fd5f6.tar.bz2
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
Diffstat (limited to 'tools/gn/settings.cc')
-rw-r--r--tools/gn/settings.cc3
1 files changed, 2 insertions, 1 deletions
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();