From b1b290b0e3cad1b362ec56a7aeb8db05e63007da Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 16 Jun 2022 18:46:34 +0200 Subject: Fix dependency search and linking for ld and so targets. --- src/task_so.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/task_so.cc') diff --git a/src/task_so.cc b/src/task_so.cc index 1af14b5..2bd27c4 100644 --- a/src/task_so.cc +++ b/src/task_so.cc @@ -33,9 +33,7 @@ TaskSO::TaskSO(const BuildConfiguration& config, for(const auto& dep : config.depends) { - std::filesystem::path depFile = settings.builddir; - depFile /= dep; - depFiles.push_back(depFile); + depFiles.push_back(dep); } flagsFile = std::filesystem::path(settings.builddir) / cleanUp(sourceDir) / targetFile().stem(); @@ -90,12 +88,7 @@ int TaskSO::runInner() for(const auto& task : getDependsTasks()) { - args.push_back(task->target()); - } - - for(const auto& depFile : depFiles) - { - args.push_back(depFile.string()); + args.push_back(task->targetFile().string()); } for(const auto& flag : config.flags.ldflags) -- cgit v1.2.3