summaryrefslogtreecommitdiff
path: root/src/task_ld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/task_ld.cc')
-rw-r--r--src/task_ld.cc20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/task_ld.cc b/src/task_ld.cc
index 918fdee..600de8e 100644
--- a/src/task_ld.cc
+++ b/src/task_ld.cc
@@ -100,31 +100,17 @@ bool TaskLD::dirtyInner()
int TaskLD::runInner()
{
- std::string objectlist;
- for(const auto& objectFile : objectFiles)
- {
- if(!objectlist.empty())
- {
- objectlist += " ";
- }
- objectlist += objectFile.string();
- }
-
std::vector<std::string> args;
- for(const auto& objectFile : objectFiles)
- {
- args.push_back(objectFile.string());
- }
-
- for(const auto& depFile : depFiles)
+ for(const auto& dep : getDependsTasks())
{
+ std::filesystem::path depFile = dep->target();
if(depFile.extension() == ".so")
{
args.push_back(std::string("-L") + settings.builddir);
auto lib = depFile.stem().string().substr(3); // strip 'lib' prefix
args.push_back(std::string("-l") + lib);
}
- else if(depFile.extension() == ".a")
+ else if(depFile.extension() == ".a" || depFile.extension() == ".o")
{
args.push_back(depFile.string());
}