From ae5cab7489fe014dd3aa818cf2655d7a4714af83 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 16 Dec 2017 17:42:12 +0200 Subject: Improve process execution diagnostics by reusing run_*() API --- build2/cc/guess.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'build2/cc/guess.cxx') diff --git a/build2/cc/guess.cxx b/build2/cc/guess.cxx index 6dea97d..c39c02e 100644 --- a/build2/cc/guess.cxx +++ b/build2/cc/guess.cxx @@ -248,7 +248,7 @@ namespace build2 // Suppress all the compiler errors because we may be trying an // unsupported option. // - r = run (pp, "-v", f, false, false, &cs); + r = run (3, pp, "-v", f, false, false, &cs); if (!r.empty ()) { @@ -284,7 +284,7 @@ namespace build2 return guess_result (); }; - r = run (pp, "--version", f, false); + r = run (3, pp, "--version", f, false); } // Finally try to run it without any options to detect msvc. @@ -317,7 +317,7 @@ namespace build2 return guess_result (); }; - r = run (pp, f, false); + r = run (3, pp, f, false); } if (!r.empty ()) @@ -487,7 +487,7 @@ namespace build2 // auto f = [] (string& l) {return move (l);}; - string t (run (args.data (), f, false)); + string t (run (3, args.data (), f, false)); if (t.empty ()) { @@ -495,7 +495,7 @@ namespace build2 << "falling back to -dumpmachine";}); args[1] = "-dumpmachine"; - t = run (args.data (), f); + t = run (3, args.data (), f); } if (t.empty ()) @@ -609,7 +609,7 @@ namespace build2 // The output of -dumpmachine is a single line containing just the // target triplet. // - string t (run (args.data (), [] (string& l) {return move (l);})); + string t (run (3, args.data (), [](string& l) {return move (l);})); if (t.empty ()) fail << "unable to extract target architecture from " << xc @@ -682,7 +682,7 @@ namespace build2 // The -V output is sent to STDERR. // - s = run (xc, "-V", f, false); + s = run (3, xc, "-V", f, false); if (s.empty ()) fail << "unable to extract signature from " << xc << " -V output"; @@ -781,7 +781,7 @@ namespace build2 // The -V output is sent to STDERR. // - string t (run (args.data (), f, false)); + string t (run (3, args.data (), f, false)); if (t.empty ()) fail << "unable to extract target architecture from " << xc @@ -823,7 +823,7 @@ namespace build2 // on which we are running), who knows what will happen in the future. // So instead we are going to use -dumpmachine and substitute the CPU. // - t = run (xc, "-dumpmachine", [] (string& l) {return move (l);}); + t = run (3, xc, "-dumpmachine", [](string& l) {return move (l);}); if (t.empty ()) fail << "unable to extract target architecture from " << xc -- cgit v1.1