diff options
| author | Bent Bisballe Nyeng <deva@aasimon.org> | 2026-01-27 19:42:57 +0100 |
|---|---|---|
| committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2026-01-27 19:42:57 +0100 |
| commit | 7b493a531decb401ab9b141dd2d7aa7d1338fbdf (patch) | |
| tree | 9343c843b5a4c2e8234f7a7e085ffc07ceb1ebad /src/task_ld.cc | |
| parent | 282f90f717d93267b2bc64d8bfa4e3e2b7c21711 (diff) | |
Clean up target_type usage a bit and add new ctor::target_type::module type.modules
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())); |
