summaryrefslogtreecommitdiff
path: root/src/task_so.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-16 17:51:57 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-16 17:51:57 +0100
commit9da7f08eb0f34f52561a62d7cf1004621b7d83c2 (patch)
tree012a9620b5a52f7a1098d04a1cb6c45404e41e1b /src/task_so.cc
parenta257c2f4d333969c73d8b27124e658db6430645a (diff)
Make file extensions abstract based on tool-chain type.
Diffstat (limited to 'src/task_so.cc')
-rw-r--r--src/task_so.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/task_so.cc b/src/task_so.cc
index 9061591..9aae7ff 100644
--- a/src/task_so.cc
+++ b/src/task_so.cc
@@ -24,7 +24,10 @@ TaskSO::TaskSO(const ctor::build_configuration& config,
std::filesystem::path base = sourceDir;
std::filesystem::create_directories(std::filesystem::path(settings.builddir) / base);
+ target_type = ctor::target_type::dynamic_library;
_targetFile = base / target;
+ auto toolchain = getToolChain(config.system);
+ _targetFile = extension(toolchain, target_type, _targetFile);
for(const auto& object : objects)
{
std::filesystem::path objectFile = object;
@@ -40,7 +43,6 @@ TaskSO::TaskSO(const ctor::build_configuration& config,
flagsFile = std::filesystem::path(settings.builddir) / cleanUp(sourceDir) / targetFile().stem();
flagsFile += ".flags";
- target_type = ctor::target_type::dynamic_library;
source_language = ctor::language::c;
for(const auto& source : config.sources)
{