summaryrefslogtreecommitdiff
path: root/src/task_cc.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_cc.cc
parenta257c2f4d333969c73d8b27124e658db6430645a (diff)
Make file extensions abstract based on tool-chain type.
Diffstat (limited to 'src/task_cc.cc')
-rw-r--r--src/task_cc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/task_cc.cc b/src/task_cc.cc
index 56915f5..f16a07f 100644
--- a/src/task_cc.cc
+++ b/src/task_cc.cc
@@ -56,12 +56,14 @@ TaskCC::TaskCC(const ctor::build_configuration& config, const ctor::settings& se
if(source.output.empty())
{
_targetFile = base;
- _targetFile += ".o";
}
else
{
_targetFile = source.output;
}
+ auto toolchain = getToolChain(config.system);
+ _targetFile = extension(toolchain, target_type, _targetFile);
+
depsFile = targetFile().parent_path() / targetFile().stem();
depsFile += ".d";
flagsFile = targetFile().parent_path() / targetFile().stem();