From d00a96c846dc7bad686d174aa27ad7d66da149da Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 2 Dec 2021 21:35:45 +0100 Subject: Add support for bootstrapping with custom compiler, including check for c++20 support. --- src/bootstrap.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/bootstrap.cc') diff --git a/src/bootstrap.cc b/src/bootstrap.cc index 08f7b1f..bf597ea 100644 --- a/src/bootstrap.cc +++ b/src/bootstrap.cc @@ -3,6 +3,7 @@ // See accompanying file LICENSE for details. #include #include +#include #define BOOTSTRAP @@ -29,12 +30,23 @@ const Configuration& configuration() bool hasConfiguration(const std::string& key) { + if(key == cfg::host_cxx && std::getenv("CXX")) + { + return true; + } + return false; } const std::string& getConfiguration(const std::string& key, const std::string& defaultValue) { + if(key == cfg::host_cxx && std::getenv("CXX")) + { + static std::string s = std::getenv("CXX"); + return s; + } + return defaultValue; } -- cgit v1.2.3