Skip to content

Commit

Permalink
missingdeps: add exception for targets that dep on build.ninja
Browse files Browse the repository at this point in the history
A "missing dep path" to build.ninja is a false positive, skip reporting it.
  • Loading branch information
ilor committed Sep 17, 2020
1 parent 06852d6 commit e04cd70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/missing_deps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ void MissingDependencyScanner::ProcessNodeDeps(Node* node, Node** dep_nodes,
std::set<Edge*> deplog_edges;
for (int i = 0; i < dep_nodes_count; ++i) {
Node* deplog_node = dep_nodes[i];
// Special exception: A dep on build.ninja can be used to mean "always
// rebuild this target when the build is reconfigured", but build.ninja is
// often generated by a configuration tool like cmake or gn. The rest of
// the build "implicitly" depends on the entire build being reconfigured,
// so a missing dep path to build.ninja is not an actual missing dependecy
// problem.
if (deplog_node->path() == "build.ninja")
return;
Edge* deplog_edge = deplog_node->in_edge();
if (deplog_edge) {
deplog_edges.insert(deplog_edge);
Expand Down

0 comments on commit e04cd70

Please sign in to comment.