mirror of
https://github.com/reactos/ninja.git
synced 2025-02-22 20:52:24 +00:00
Merge pull request #1237 from danw/no_reload_with_restat
Support restat when rebuilding manifest
This commit is contained in:
commit
4dc4f1dee9
17
src/ninja.cc
17
src/ninja.cc
@ -247,10 +247,19 @@ bool NinjaMain::RebuildManifest(const char* input_file, string* err) {
|
||||
if (builder.AlreadyUpToDate())
|
||||
return false; // Not an error, but we didn't rebuild.
|
||||
|
||||
// Even if the manifest was cleaned by a restat rule, claim that it was
|
||||
// rebuilt. Not doing so can lead to crashes, see
|
||||
// https://github.com/ninja-build/ninja/issues/874
|
||||
return builder.Build(err);
|
||||
if (!builder.Build(err))
|
||||
return false;
|
||||
|
||||
// The manifest was only rebuilt if it is now dirty (it may have been cleaned
|
||||
// by a restat).
|
||||
if (!node->dirty()) {
|
||||
// Reset the state to prevent problems like
|
||||
// https://github.com/ninja-build/ninja/issues/874
|
||||
state_.Reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Node* NinjaMain::CollectTarget(const char* cpath, string* err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user