mirror of
https://github.com/reactos/ninja.git
synced 2024-11-30 07:00:37 +00:00
build: add to deps log for each edge output
This commit is contained in:
parent
2d15b04e41
commit
e2433c11d0
16
src/build.cc
16
src/build.cc
@ -1034,13 +1034,15 @@ bool Builder::FinishCommand(CommandRunner::Result* result, string* err) {
|
||||
|
||||
if (!deps_type.empty() && !config_.dry_run) {
|
||||
assert(edge->outputs_.size() == 1 && "should have been rejected by parser");
|
||||
Node* out = edge->outputs_[0];
|
||||
TimeStamp deps_mtime = disk_interface_->Stat(out->path(), err);
|
||||
if (deps_mtime == -1)
|
||||
return false;
|
||||
if (!scan_.deps_log()->RecordDeps(out, deps_mtime, deps_nodes)) {
|
||||
*err = string("Error writing to deps log: ") + strerror(errno);
|
||||
return false;
|
||||
for (std::vector<Node*>::const_iterator o = edge->outputs_.begin();
|
||||
o != edge->outputs_.end(); ++o) {
|
||||
TimeStamp deps_mtime = disk_interface_->Stat((*o)->path(), err);
|
||||
if (deps_mtime == -1)
|
||||
return false;
|
||||
if (!scan_.deps_log()->RecordDeps(*o, deps_mtime, deps_nodes)) {
|
||||
*err = std::string("Error writing to deps log: ") + strerror(errno);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user