summaryrefslogtreecommitdiff
path: root/src/bootstrap.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-12-02 21:35:45 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2021-12-03 17:17:00 +0100
commitd00a96c846dc7bad686d174aa27ad7d66da149da (patch)
tree0903c595e12f09ed9205d81e16d4c79c8efc9102 /src/bootstrap.cc
parent21d50e927303354f3ddde1a0c2b60cc4900906c4 (diff)
Add support for bootstrapping with custom compiler, including check for c++20 support.custom-gcc-bootstrap
Diffstat (limited to 'src/bootstrap.cc')
-rw-r--r--src/bootstrap.cc12
1 files changed, 12 insertions, 0 deletions
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 <iostream>
#include <array>
+#include <cstdlib>
#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;
}