diff options
author | Evan Martin <martine@danga.com> | 2015-12-09 22:48:14 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2015-12-09 22:48:14 (GMT) |
commit | 9a4eb587f3d3dcc6e6edd8d344a93b1c32d27dc7 (patch) | |
tree | 8c24f4125059defdf40a9b5af0f6b999f71269aa | |
parent | 2eb1cc9329d2e8c7d80ce01c5af044e383e1e50e (diff) | |
parent | 956876408a64135d8448f2f55fc9213003edb40e (diff) | |
download | Ninja-9a4eb587f3d3dcc6e6edd8d344a93b1c32d27dc7.zip Ninja-9a4eb587f3d3dcc6e6edd8d344a93b1c32d27dc7.tar.gz Ninja-9a4eb587f3d3dcc6e6edd8d344a93b1c32d27dc7.tar.bz2 |
Merge pull request #1069 from nicolasdespres/dry_manifest_regen
Do not attempt to rebuild infinitely in dry-run mode.
-rw-r--r-- | src/ninja.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 21dede6..a73f83c 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -1135,6 +1135,10 @@ int real_main(int argc, char** argv) { // Attempt to rebuild the manifest before building anything else if (ninja.RebuildManifest(options.input_file, &err)) { + // In dry_run mode the regeneration will succeed without changing the + // manifest forever. Better to return immediately. + if (config.dry_run) + return 0; // Start the build over with the new manifest. continue; } else if (!err.empty()) { |