diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2014-05-05 19:00:26 (GMT) |
---|---|---|
committer | Ben Boeckel <mathstuf@gmail.com> | 2014-05-05 19:04:26 (GMT) |
commit | 03d5b7b0bd06cab5f43e8b85accc7b6450626f39 (patch) | |
tree | eb67fb0330f20e759fc2d50f2ae2f4d562e9a80d | |
parent | 4f14f89367f5e68ab7915556f23d9ed0ee8a1f87 (diff) | |
download | Ninja-03d5b7b0bd06cab5f43e8b85accc7b6450626f39.zip Ninja-03d5b7b0bd06cab5f43e8b85accc7b6450626f39.tar.gz Ninja-03d5b7b0bd06cab5f43e8b85accc7b6450626f39.tar.bz2 |
compdb: check that inputs is not empty
-rw-r--r-- | src/ninja.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 03ca83b..50de43e 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -631,6 +631,8 @@ int NinjaMain::ToolCompilationDatabase(int argc, char* argv[]) { putchar('['); for (vector<Edge*>::iterator e = state_.edges_.begin(); e != state_.edges_.end(); ++e) { + if ((*e)->inputs_.empty()) + continue; for (int i = 0; i != argc; ++i) { if ((*e)->rule_->name() == argv[i]) { if (!first) |