summaryrefslogtreecommitdiff
path: root/src/bootstrap.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2022-12-28 13:49:53 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-12 15:15:53 +0100
commitcc4e14d243f4e7e1ad487d8865c5ffc8423e473d (patch)
tree10473afd8cf2f6bd6385e1d50b0e2699069fb3eb /src/bootstrap.cc
parent430801b1307b4c820885f161d0b003011c892d77 (diff)
Add detected toolchain to configuration.cc
Diffstat (limited to 'src/bootstrap.cc')
-rw-r--r--src/bootstrap.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bootstrap.cc b/src/bootstrap.cc
index f091849..0604527 100644
--- a/src/bootstrap.cc
+++ b/src/bootstrap.cc
@@ -22,10 +22,17 @@
std::filesystem::path configurationFile("configuration.cc");
std::filesystem::path configHeaderFile("config.h");
-const ctor::configuration default_configuration{};
const ctor::configuration& ctor::get_configuration()
{
- return default_configuration;
+ static ctor::configuration cfg;
+ static bool initialised{false};
+ if(!initialised)
+ {
+ cfg.host_toolchain = getToolChain(cfg.get(ctor::cfg::host_cxx, "/usr/bin/g++"));
+ initialised = true;
+ }
+
+ return cfg;
}
bool ctor::configuration::has(const std::string& key) const