From 6324239cf260f82312143a83855eb53bdc890a70 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 24 Nov 2017 17:52:07 +0200 Subject: Improve diagnostics --- build2/cc/gcc.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'build2/cc/gcc.cxx') 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&) { -- cgit v1.1