summaryrefslogtreecommitdiff
path: root/task_ld.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-19 09:18:26 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-19 09:18:26 +0200
commita2be8eba3aaf11a9a73092793d27d6d46b4270cd (patch)
treeec8d463fe0537785337b4632e0c59bc1185b68dc /task_ld.cc
parent80290e7d65dc498e9ea5e64aa6cbc65282072deb (diff)
Add .so target. Fix ready state checks.
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)