diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-13 19:56:35 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-13 22:32:09 +0100 |
commit | 916060cb53fddb94f64b20d3616e7360c5e91f64 (patch) | |
tree | 4a2bcef4672b5e04b106f88cca3bec631b214c00 /src/task_ar.cc | |
parent | c093758b4688fb5bae2cc7727b6c9b52b824043e (diff) |
Capture flags in a class instead of a string and add conversion functions between them.
Diffstat (limited to 'src/task_ar.cc')
-rw-r--r-- | src/task_ar.cc | 13 |
1 files changed, 10 insertions, 3 deletions
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"; |