diff options
Diffstat (limited to 'src/task_ld.cc')
| -rw-r--r-- | src/task_ld.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/task_ld.cc b/src/task_ld.cc index a1cff34..2dceb59 100644 --- a/src/task_ld.cc +++ b/src/task_ld.cc @@ -11,25 +11,18 @@ #include "util.h" #include "tools.h" -TaskLD::TaskLD(const ctor::build_configuration& config_, +TaskLD::TaskLD(ctor::target_type resolved_target_type, + const ctor::build_configuration& config_, const ctor::settings& settings_, const std::string& target, const std::vector<std::string>& objects, const std::string& sourceDir_, bool is_self_) - : Task(config_, settings_, sourceDir_) + : Task(resolved_target_type, config_, settings_, sourceDir_) , config(config_) , settings(settings_) , is_self(is_self_) { - target_type = config.type; - output_system = config.system; - - if(target_type == ctor::target_type::automatic) - { - target_type = ctor::target_type::executable; - } - _targetFile = target; auto toolchain = getToolChain(config.system); _targetFile = extension(toolchain, target_type, config.system, _targetFile); @@ -98,7 +91,7 @@ int TaskLD::runInner() { auto depFile = dep->targetFile(); auto dep_type = target_type_from_extension(toolchain, depFile); - if(dep_type == ctor::target_type::dynamic_library) + if(dep_type == ctor::target_type::shared_library) { append(args, ld_option(toolchain, ctor::ld_opt::library_path, targetFile().parent_path().string())); |
