From be2774dd81da77661511280fda868a02e4be87eb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Nov 2018 15:25:59 +0200 Subject: Only search for external tools (compilers, linkers, etc) in PATH Specifically, omit the current executable's directory on Windows since there is no reason for them to be found there automagically and this can lead to surprising behavior (for example, our MinGW GCC being used instead of the user's even though the user's is in PATH before ours). --- build2/utility.hxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build2/utility.hxx') diff --git a/build2/utility.hxx b/build2/utility.hxx index 6527d3a..8157c02 100644 --- a/build2/utility.hxx +++ b/build2/utility.hxx @@ -150,12 +150,21 @@ namespace build2 // case of an error. // process_path - run_search (const char*& args0, const location& = location ()); + run_search (const char*& args0, + bool path_only, + const location& = location ()); + + inline process_path + run_search (const char*& args0, const location& l = location ()) + { + return run_search (args0, false, l); + } process_path run_search (const path&, bool init = false, const dir_path& fallback = dir_path (), + bool path_only = false, const location& = location ()); // Wait for process termination. Issue diagnostics and throw failed in case -- cgit v1.1