summaryrefslogtreecommitdiff
path: root/src/task_ar.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-14 12:05:23 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-14 12:10:58 +0100
commit321f25af1ba33d8409cd294b4f50d0d3e79cf3bd (patch)
tree586c8297ca89e477ae8dfc228dd71f0b15f96faa /src/task_ar.cc
parentd5c88fedf517e738490c32fa95097e03178903fe (diff)
Add ar_flag support for ar tool, replacing hardcoded values.HEADmaster
Diffstat (limited to 'src/task_ar.cc')
-rw-r--r--src/task_ar.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/task_ar.cc b/src/task_ar.cc
index 81ced0f..426a576 100644
--- a/src/task_ar.cc
+++ b/src/task_ar.cc
@@ -78,9 +78,13 @@ bool TaskAR::dirtyInner()
int TaskAR::runInner()
{
+ auto toolchain = getToolChain(config.system);
+
std::vector<std::string> args;
- args.push_back("rcs");
- args.push_back(targetFile().string());
+ append(args, ar_option(toolchain, ctor::ar_opt::replace));
+ append(args, ar_option(toolchain, ctor::ar_opt::add_index));
+ append(args, ar_option(toolchain, ctor::ar_opt::create));
+ append(args, ar_option(toolchain, ctor::ar_opt::output, targetFile().string()));
for(const auto& task : getDependsTasks())
{
args.push_back(task->targetFile().string());