diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-21 21:39:46 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-21 21:39:46 +0200 |
commit | b25810b9668abe8f7cc7db24326a98c1b017966e (patch) | |
tree | 40cda88ffbf8dccfc2d2335783f608966874c58e /task_ld.cc | |
parent | c53e622b648635539e4870fd0c9159c5d8c3be4a (diff) |
Distinguish between host and target builds.
Diffstat (limited to 'task_ld.cc')
-rw-r--r-- | task_ld.cc | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -66,13 +66,13 @@ TaskLD::TaskLD(const BuildConfiguration& config, flagsFile += ".flags"; target_type = TargetType::Executable; - _language = Language::C; + source_language = Language::C; for(const auto& source : config.sources) { std::filesystem::path sourceFile(source); if(sourceFile.extension().string() != ".c") { - _language = Language::Cpp; + source_language = Language::Cpp; } } } @@ -159,12 +159,7 @@ int TaskLD::runInner() std::cout << "LD => " << targetFile.string() << "\n"; } - auto tool = getConfiguration("host-cpp", "/usr/bin/g++"); - if(language() == Language::C) - { - tool = getConfiguration("host-cc", "/usr/bin/gcc"); - } - + auto tool = compiler(); return execute(tool, args, settings.verbose > 0); } |