diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-01-07 07:26:39 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-01-07 20:44:35 +0100 |
commit | c50b7554cfd23b53107f2a2917a0be22a68b0c11 (patch) | |
tree | 11594994a9d416d86b574e4914c25fde56acf74d /src/task_cc.cc | |
parent | 80c59512ea66534456f62cffbd35f440a97b7bf7 (diff) |
Move readDeps function to its own file.develop
Diffstat (limited to 'src/task_cc.cc')
-rw-r--r-- | src/task_cc.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/task_cc.cc b/src/task_cc.cc index 9a801b5..9de2657 100644 --- a/src/task_cc.cc +++ b/src/task_cc.cc @@ -12,6 +12,7 @@ #include "execute.h" #include "util.h" #include "tools.h" +#include "deps.h" TaskCC::TaskCC(const ctor::build_configuration& config_, const ctor::settings& settings_, const std::string& sourceDir_, const ctor::source& source) @@ -136,7 +137,8 @@ bool TaskCC::dirtyInner() } } - auto depList = readDeps(depsFile.string()); + auto toolchain = getToolChain(config.system); + auto depList = readDeps(depsFile.string(), toolchain); for(const auto& dep : depList) { if(!std::filesystem::exists(dep) || @@ -288,6 +290,7 @@ std::vector<std::string> TaskCC::flags() const exit(1); break; } + } std::string TaskCC::flagsString() const @@ -311,7 +314,7 @@ std::vector<std::string> TaskCC::getCompilerArgs() const { case ctor::language::c: { - append(args, c_option(toolchain, ctor::c_opt::generate_dep_tree)); + append(args, c_option(toolchain, ctor::c_opt::generate_dep_tree, depsFile.string())); if(std::filesystem::path(config.target).extension() == ".so") { @@ -353,7 +356,7 @@ std::vector<std::string> TaskCC::getCompilerArgs() const case ctor::language::cpp: { - append(args, cxx_option(toolchain, ctor::cxx_opt::generate_dep_tree)); + append(args, cxx_option(toolchain, ctor::cxx_opt::generate_dep_tree, depsFile.string())); if(std::filesystem::path(config.target).extension() == ".so") { |