diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-16 17:51:57 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-16 17:51:57 +0100 |
commit | 9da7f08eb0f34f52561a62d7cf1004621b7d83c2 (patch) | |
tree | 012a9620b5a52f7a1098d04a1cb6c45404e41e1b /src/task_ar.cc | |
parent | a257c2f4d333969c73d8b27124e658db6430645a (diff) |
Make file extensions abstract based on tool-chain type.
Diffstat (limited to 'src/task_ar.cc')
-rw-r--r-- | src/task_ar.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/task_ar.cc b/src/task_ar.cc index 88c78c6..b73c6ac 100644 --- a/src/task_ar.cc +++ b/src/task_ar.cc @@ -23,7 +23,10 @@ TaskAR::TaskAR(const ctor::build_configuration& config, { std::filesystem::create_directories(std::filesystem::path(settings.builddir) / sourceDir); + target_type = ctor::target_type::static_library; _targetFile = target; + auto toolchain = getToolChain(config.system); + _targetFile = extension(toolchain, target_type, _targetFile); for(const auto& object : objects) { std::filesystem::path objectFile = object; @@ -39,7 +42,6 @@ TaskAR::TaskAR(const ctor::build_configuration& config, flagsFile = std::filesystem::path(settings.builddir) / cleanUp(sourceDir) / targetFile().stem(); flagsFile += ".flags"; - target_type = ctor::target_type::static_library; source_language = ctor::language::c; for(const auto& source : config.sources) { |