diff options
Diffstat (limited to 'task_cc.cc')
-rw-r--r-- | task_cc.cc | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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"); |