Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dyndep patches #2215

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/clean.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ int Cleaner::CleanAll(bool generator) {
int Cleaner::CleanDead(const BuildLog::Entries& entries) {
Reset();
PrintHeader();
LoadDyndeps();
for (BuildLog::Entries::const_iterator i = entries.begin(); i != entries.end(); ++i) {
Node* n = state_->LookupNode(i->first);
// Detecting stale outputs works as follows:
Expand Down Expand Up @@ -290,9 +291,10 @@ void Cleaner::Reset() {

void Cleaner::LoadDyndeps() {
// Load dyndep files that exist, before they are cleaned.
Node *dyndep;
for (vector<Edge*>::iterator e = state_->edges_.begin();
e != state_->edges_.end(); ++e) {
if (Node* dyndep = (*e)->dyndep_) {
if ((dyndep = (*e)->dyndep_) && dyndep->dyndep_pending()) {
// Capture and ignore errors loading the dyndep file.
// We clean as much of the graph as we know.
std::string err;
Expand Down