Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ namespace {
// Heuristic for edge priority weighting.
// Phony edges are free (0 cost), all other edges are weighted equally.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// ... all other edges are weighted equally.

This comment is outdated and could be updated.

int64_t EdgeWeightHeuristic(Edge *edge) {
return edge->is_phony() ? 0 : 1;
int64_t prev_elapsed_time_millis =
edge->prev_elapsed_time_millis < 0 ? 1 : edge->prev_elapsed_time_millis;
return edge->is_phony() ? 0 : prev_elapsed_time_millis;
}

} // namespace
Expand Down