summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/bootstrap.cc b/src/bootstrap.cc
index 0179f7b..42706c1 100644
--- a/src/bootstrap.cc
+++ b/src/bootstrap.cc
@@ -43,28 +43,33 @@ bool ctor::configuration::has(const std::string& key) const
std::string ctor::configuration::get(const std::string& key, const std::string& default_value) const
{
+ static auto paths = get_paths();
auto cxx_env = std::getenv("CXX");
if(key == ctor::cfg::build_cxx && cxx_env)
{
- return cxx_env;
+ static auto cxx_prog = locate(cxx_env, paths);
+ return cxx_prog;
}
auto cc_env = std::getenv("CC");
if(key == ctor::cfg::build_cc && cc_env)
{
- return cc_env;
+ static auto cc_prog = locate(cc_env, paths);
+ return cc_prog;
}
auto ld_env = std::getenv("LD");
if(key == ctor::cfg::build_ld && ld_env)
{
- return ld_env;
+ static auto ld_prog = locate(ld_env, paths);
+ return ld_prog;
}
auto ar_env = std::getenv("AR");
if(key == ctor::cfg::build_ar && ar_env)
{
- return ar_env;
+ static auto ar_prog = locate(ar_env, paths);
+ return ar_prog;
}
auto builddir_env = std::getenv("BUILDDIR");