From bbff2b69459a370afd6c74b6b0d3bb080ff22b89 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 14 Mar 2016 13:30:47 +0200 Subject: Add support for guessing ar/ranlib signatures --- build2/cxx/link.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build2/cxx/link.cxx') diff --git a/build2/cxx/link.cxx b/build2/cxx/link.cxx index 0002797..f9fa69d 100644 --- a/build2/cxx/link.cxx +++ b/build2/cxx/link.cxx @@ -827,8 +827,10 @@ namespace build2 if (lt == type::a) { // If the user asked for ranlib, don't try to do its function with -s. + // Some ar implementations (e.g., the LLVM one) doesn't support + // leading '-'. // - args.push_back (ranlib ? "-rc" : "-rcs"); + args.push_back (ranlib ? "rc" : "rcs"); } else { @@ -1048,6 +1050,9 @@ namespace build2 const char* args[] = { as (*ranlib).c_str (), relt.string ().c_str (), nullptr}; + if (verb >= 2) + print_process (args); + try { process pr (args); -- cgit v1.1