aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/cc/link-rule.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index 16a4ce7..71d609d 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -2188,6 +2188,19 @@ namespace build2
// Add /MACHINE.
//
args.push_back (msvc_machine (cast<string> (rs[x_target_cpu])));
+
+ // For utility libraries use thin archives if possible.
+ //
+ // LLVM's lib replacement had the /LLVMLIBTHIN option at least from
+ // version 3.8 so we will assume always.
+ //
+ if (lt.utility)
+ {
+ const string& id (cast<string> (rs["bin.ar.id"]));
+
+ if (id == "msvc-llvm")
+ args.push_back ("/LLVMLIBTHIN");
+ }
}
else
{