summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2013-04-11 19:46:34 (GMT)
committerEvan Martin <martine@danga.com>2013-04-11 19:46:34 (GMT)
commit4c4460e0cae20d64eb2d6240e10cdb4d0ea757fd (patch)
treeeb6dfee8de47ac9782f45d6ab20207dde352b2be /src/build.cc
parent2aa23a8bacaeea8155d50acbe55f1cd0dfae5a1c (diff)
downloadNinja-4c4460e0cae20d64eb2d6240e10cdb4d0ea757fd.zip
Ninja-4c4460e0cae20d64eb2d6240e10cdb4d0ea757fd.tar.gz
Ninja-4c4460e0cae20d64eb2d6240e10cdb4d0ea757fd.tar.bz2
windows: always extract dependencies, even on compile failure
We always want to filter /showIncludes output.
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/build.cc b/src/build.cc
index 199749f..fed3065 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -710,14 +710,16 @@ void Builder::FinishCommand(CommandRunner::Result* result) {
Edge* edge = result->edge;
// First try to extract dependencies from the result, if any.
- // This must happen first as it filters the command output and
- // can fail, which makes the command fail from a build perspective.
-
+ // This must happen first as it filters the command output (we want
+ // to filter /showIncludes output, even on compile failure) and
+ // extraction itself can fail, which makes the command fail from a
+ // build perspective.
vector<Node*> deps_nodes;
string deps_type = edge->GetBinding("deps");
- if (result->success() && !deps_type.empty()) {
+ if (!deps_type.empty()) {
string extract_err;
- if (!ExtractDeps(result, deps_type, &deps_nodes, &extract_err)) {
+ if (!ExtractDeps(result, deps_type, &deps_nodes, &extract_err) &&
+ result->success()) {
if (!result->output.empty())
result->output.append("\n");
result->output.append(extract_err);