diff options
Diffstat (limited to 'src/task_so.cc')
-rw-r--r-- | src/task_so.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/task_so.cc b/src/task_so.cc index ba96388..eecd7aa 100644 --- a/src/task_so.cc +++ b/src/task_so.cc @@ -11,15 +11,15 @@ #include "util.h" #include "tools.h" -TaskSO::TaskSO(const ctor::build_configuration& config, - const ctor::settings& settings, +TaskSO::TaskSO(const ctor::build_configuration& config_, + const ctor::settings& settings_, const std::string& target, const std::vector<std::string>& objects, - const std::string& sourceDir) - : Task(config, settings, sourceDir) - , config(config) - , settings(settings) - , sourceDir(sourceDir) + const std::string& sourceDir_) + : Task(config_, settings_, sourceDir_) + , config(config_) + , settings(settings_) + , sourceDir(sourceDir_) { std::filesystem::path base = sourceDir; @@ -38,7 +38,7 @@ TaskSO::TaskSO(const ctor::build_configuration& config, for(const auto& dep : config.depends) { - depFiles.push_back(dep); + depFiles.emplace_back(dep); } flagsFile = std::filesystem::path(settings.builddir) / cleanUp(sourceDir) / targetFile().stem(); @@ -110,11 +110,13 @@ int TaskSO::runInner() if(settings.verbose == 0) { - std::cout << "LD => " << targetFile().string() << std::endl; + std::string output = "LD => " + targetFile().string() + '\n'; + std::cout << output << std::flush; } auto tool = compiler(); - return execute(tool, args, {}, settings.verbose > 0); + const auto& cfg = ctor::get_configuration(); + return execute(settings, tool, args, cfg.env); } int TaskSO::clean() |