summaryrefslogtreecommitdiff
path: root/task_cc.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_cc.cc
parent80290e7d65dc498e9ea5e64aa6cbc65282072deb (diff)
Add .so target. Fix ready state checks.
Diffstat (limited to 'task_cc.cc')
-rw-r--r--task_cc.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/task_cc.cc b/task_cc.cc
index 74654aa..4340f7b 100644
--- a/task_cc.cc
+++ b/task_cc.cc
@@ -178,6 +178,13 @@ int TaskCC::runInner()
std::vector<std::string> args;
args.push_back("-MMD");
+
+ if(std::filesystem::path(config.target).extension() == ".so")
+ {
+ // Add -fPIC arg to all contained object files
+ args.push_back("-fPIC");
+ }
+
args.push_back("-c");
args.push_back(std::string(sourceFile));
args.push_back("-o");