summaryrefslogtreecommitdiff
path: root/src/task_ld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/task_ld.cc')
-rw-r--r--src/task_ld.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/task_ld.cc b/src/task_ld.cc
index 4a77c72..ec68190 100644
--- a/src/task_ld.cc
+++ b/src/task_ld.cc
@@ -44,7 +44,11 @@ TaskLD::TaskLD(const BuildConfiguration& config,
, config(config)
, settings(settings)
{
- target_type = TargetType::Executable;
+ target_type = config.type;
+ if(target_type == TargetType::Auto)
+ {
+ target_type = TargetType::Executable;
+ }
targetFile = settings.builddir;
targetFile /= target;
@@ -65,7 +69,6 @@ TaskLD::TaskLD(const BuildConfiguration& config,
flagsFile = settings.builddir / targetFile.stem();
flagsFile += ".flags";
- target_type = TargetType::Executable;
source_language = Language::C;
for(const auto& source : config.sources)
{