summaryrefslogtreecommitdiff
path: root/src/task.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 19:57:00 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 20:06:56 +0100
commit6af7742c35ecdf2831908443ca0e04bf23317a96 (patch)
tree9ada42d1d4b6bcb2618c1325f155429d2035808a /src/task.cc
parent648c89e879f739f82ed6dba7df7243e54b98601f (diff)
Rename Configuation struct to configuration and make get/has functions member functions.
Diffstat (limited to 'src/task.cc')
-rw-r--r--src/task.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/task.cc b/src/task.cc
index cff850e..27e6c44 100644
--- a/src/task.cc
+++ b/src/task.cc
@@ -131,23 +131,24 @@ ctor::output_system Task::outputSystem() const
std::string Task::compiler() const
{
+ const auto& c = ctor::get_configuration();
switch(sourceLanguage())
{
case ctor::language::c:
switch(outputSystem())
{
case ctor::output_system::host:
- return getConfiguration(cfg::host_cc, "/usr/bin/gcc");
+ return c.get(cfg::host_cc, "/usr/bin/gcc");
case ctor::output_system::build:
- return getConfiguration(cfg::build_cc, "/usr/bin/gcc");
+ return c.get(cfg::build_cc, "/usr/bin/gcc");
}
case ctor::language::cpp:
switch(outputSystem())
{
case ctor::output_system::host:
- return getConfiguration(cfg::host_cxx, "/usr/bin/g++");
+ return c.get(cfg::host_cxx, "/usr/bin/g++");
case ctor::output_system::build:
- return getConfiguration(cfg::build_cxx, "/usr/bin/g++");
+ return c.get(cfg::build_cxx, "/usr/bin/g++");
}
default:
std::cerr << "Unknown CC target type\n";