aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/gcc.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-24 17:52:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-24 17:52:07 +0200
commit6324239cf260f82312143a83855eb53bdc890a70 (patch)
treec9db841652083d73a09ce8b1155d4bcc2bf2cfed /build2/cc/gcc.cxx
parent1bb9cc99e8926825a2daae0f0d1e2c3d15d778a5 (diff)
Improve diagnostics
Diffstat (limited to 'build2/cc/gcc.cxx')
-rw-r--r--build2/cc/gcc.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/build2/cc/gcc.cxx b/build2/cc/gcc.cxx
index bcf2a89..ce1450e 100644
--- a/build2/cc/gcc.cxx
+++ b/build2/cc/gcc.cxx
@@ -120,7 +120,16 @@ namespace build2
is.close (); // Don't block.
if (!pr.wait ())
- throw failed ();
+ {
+ // We have read stderr so better print some diagnostics.
+ //
+ diag_record dr (fail);
+
+ dr << "failed to extract " << x_lang << " header search paths" <<
+ info << "command line: ";
+
+ print_process (dr, args);
+ }
}
catch (const io_error&)
{
@@ -203,7 +212,7 @@ namespace build2
is.close (); // Don't block.
if (!pr.wait ())
- throw failed ();
+ throw failed (); // Assume issued diagnostics to stderr.
}
catch (const io_error&)
{