summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-02-20 21:20:45 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2012-02-21 02:06:51 (GMT)
commit6cf2f5a98608ad1aeeae791fbba6bfacbf135538 (patch)
tree7ae022034a315242bca9f133d126114e1cde4b7b
parent0eebd5fe1dec021a63110ecab8fa411f9980745f (diff)
downloadNinja-6cf2f5a98608ad1aeeae791fbba6bfacbf135538.zip
Ninja-6cf2f5a98608ad1aeeae791fbba6bfacbf135538.tar.gz
Ninja-6cf2f5a98608ad1aeeae791fbba6bfacbf135538.tar.bz2
Do not reload the manifest if a restat cleans it while being rebuilt
-rw-r--r--src/ninja.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 6cc2276..7f07053 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -150,7 +150,12 @@ bool RebuildManifest(State* state, const BuildConfig& config,
if (manifest_builder.AlreadyUpToDate())
return false; // Not an error, but we didn't rebuild.
- return manifest_builder.Build(err);
+ if (!manifest_builder.Build(err))
+ return false;
+
+ // The manifest was only rebuilt if it is now dirty (it may have been cleaned
+ // by a restat).
+ return node->dirty();
}
bool CollectTargetsFromArgs(State* state, int argc, char* argv[],