diff options
author | Brad King <brad.king@kitware.com> | 2019-02-12 18:12:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-18 12:21:44 (GMT) |
commit | e1a58793ef080d4dcd2b404718a8d24307958591 (patch) | |
tree | c8394b1588157116a7cd76dec122e4cc4d75cb9b /src/ninja.cc | |
parent | a32e047b4f0e083eb8f9d9cdca9238bb4b006e4a (diff) | |
download | Ninja-e1a58793ef080d4dcd2b404718a8d24307958591.zip Ninja-e1a58793ef080d4dcd2b404718a8d24307958591.tar.gz Ninja-e1a58793ef080d4dcd2b404718a8d24307958591.tar.bz2 |
query: load dyndep files for queried edges
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 4a176c1..5f19a65 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -353,6 +353,8 @@ int NinjaMain::ToolQuery(const Options* options, int argc, char* argv[]) { return 1; } + DyndepLoader dyndep_loader(&state_, &disk_interface_); + for (int i = 0; i < argc; ++i) { string err; Node* node = CollectTarget(argv[i], &err); @@ -363,6 +365,11 @@ int NinjaMain::ToolQuery(const Options* options, int argc, char* argv[]) { printf("%s:\n", node->path().c_str()); if (Edge* edge = node->in_edge()) { + if (edge->dyndep_ && edge->dyndep_->dyndep_pending()) { + if (!dyndep_loader.LoadDyndeps(edge->dyndep_, &err)) { + Warning("%s\n", err.c_str()); + } + } printf(" input: %s\n", edge->rule_->name().c_str()); for (int in = 0; in < (int)edge->inputs_.size(); in++) { const char* label = ""; |