From 916060cb53fddb94f64b20d3616e7360c5e91f64 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 13 Jan 2023 19:56:35 +0100 Subject: Capture flags in a class instead of a string and add conversion functions between them. --- src/task_ar.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/task_ar.cc') diff --git a/src/task_ar.cc b/src/task_ar.cc index edd60ae..81ced0f 100644 --- a/src/task_ar.cc +++ b/src/task_ar.cc @@ -9,6 +9,7 @@ #include "ctor.h" #include "execute.h" #include "util.h" +#include "tools.h" TaskAR::TaskAR(const ctor::build_configuration& config, const ctor::settings& settings, @@ -160,14 +161,20 @@ bool TaskAR::derived() const std::string TaskAR::flagsString() const { + auto toolchain = getToolChain(config.system); std::string flagsStr; + bool first{true}; for(const auto& flag : config.flags.ldflags) { - if(flag != config.flags.ldflags[0]) + for(const auto& str : to_strings(toolchain, flag)) { - flagsStr += " "; + if(first) + { + flagsStr += " "; + first = false; + } + flagsStr += str; } - flagsStr += flag; } flagsStr += "\n"; -- cgit v1.2.3