From 4c4460e0cae20d64eb2d6240e10cdb4d0ea757fd Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Thu, 11 Apr 2013 12:46:34 -0700 Subject: windows: always extract dependencies, even on compile failure We always want to filter /showIncludes output. --- src/build.cc | 12 +++++++----- 1 file 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 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); -- cgit v0.12