diff options
Diffstat (limited to 'src/task_ld.cc')
-rw-r--r-- | src/task_ld.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/task_ld.cc b/src/task_ld.cc index 3d89f90..20e823d 100644 --- a/src/task_ld.cc +++ b/src/task_ld.cc @@ -15,12 +15,11 @@ TaskLD::TaskLD(const BuildConfiguration& config, const Settings& settings, const std::string& target, const std::vector<std::string>& objects, - const std::string& sourceDir, bool is_self) + const std::string& sourceDir) : Task(config, settings, sourceDir) , config(config) , settings(settings) , sourceDir(sourceDir) - , is_self(is_self) { target_type = config.type; if(target_type == TargetType::Auto) @@ -96,15 +95,14 @@ int TaskLD::runInner() auto lib = depFile.stem().string().substr(3); // strip 'lib' prefix append(args, getOption(tool_chain, opt::link, lib)); } - else if(depFile.extension() == ".lib" || depFile.extension() == ".obj") + else if(depFile.extension() == ".a" || depFile.extension() == ".o") { args.push_back(depFile.string()); } } append(args, config.flags.ldflags); -// append(args, getOption(tool_chain, opt::output, targetFile().string())); - args.push_back("/out:"+targetFile().string()); + append(args, getOption(tool_chain, opt::output, targetFile().string())); { // Write flags to file. std::ofstream flagsStream(flagsFile); @@ -116,9 +114,8 @@ int TaskLD::runInner() std::cout << "LD => " << targetFile().string() << "\n"; } - auto tool = linker(); - const auto& cfg = configuration(); - return execute(tool, args, cfg.env, settings.verbose > 0, is_self); + auto tool = compiler(); + return execute(tool, args, settings.verbose > 0); } int TaskLD::clean() @@ -180,7 +177,7 @@ std::string TaskLD::flagsString() const } flagsStr += flag; } - //flagsStr += "\n"; break on win32 + flagsStr += "\n"; for(const auto& dep : config.depends) { |