From 3bc0fc4c4496c345c79734dcd6dc56d44119aebf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 8 Nov 2022 10:34:22 +0200 Subject: Make process exit diagnostics consistent In particular, we now always print error message on non-0 exit except in cases where such exit is ignored. --- libbuild2/cc/link-rule.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libbuild2/cc/link-rule.cxx') diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index af04ac7..c2ba8e7 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -3992,7 +3992,7 @@ namespace build2 } #endif - if (verb > 2) + if (verb >= 3) print_process (args); // Remove the target file if any of the subsequent (after the linker) @@ -4042,11 +4042,13 @@ namespace build2 #ifdef _WIN32 // Keep the options file if we have shown it. // - if (!e && verb > 2) + if (!e && verb >= 3) trm.cancel (); #endif - dbuf.close (oargs.empty () ? args : oargs, *pr.exit); + dbuf.close (oargs.empty () ? args : oargs, + *pr.exit, + 1 /* verbosity */); if (!e) throw failed (); @@ -4115,6 +4117,7 @@ namespace build2 run (dbuf, rl, args, + 1 /* finish_verbosity */, env_ptrs.empty () ? nullptr : env_ptrs.data ()); } } -- cgit v1.1