summaryrefslogtreecommitdiff
path: root/task_ld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'task_ld.cc')
-rw-r--r--task_ld.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/task_ld.cc b/task_ld.cc
index fcde6d4..db0f955 100644
--- a/task_ld.cc
+++ b/task_ld.cc
@@ -117,7 +117,16 @@ int TaskLD::runInner()
for(const auto& depFile : depFiles)
{
- args.push_back(depFile.string());
+ 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")
+ {
+ args.push_back(depFile.string());
+ }
}
for(const auto& flag : config.ldflags)