summaryrefslogtreecommitdiff
path: root/src/task_ar.cc
diff options
context:
space:
mode:
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());