aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
-rw-r--r--llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp b/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
index 3a609ee..9ca63be 100644
--- a/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
+++ b/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
@@ -455,10 +455,12 @@ int llvm::libDriverMain(ArrayRef<const char *> ArgsArr) {
// For compatibility with MSVC, reverse member vector after de-duplication.
std::reverse(Members.begin(), Members.end());
+ bool Thin = Args.hasArg(OPT_llvmlibthin);
if (Error E =
writeArchive(OutputPath, Members,
- /*WriteSymtab=*/true, object::Archive::K_GNU,
- /*Deterministic*/ true, Args.hasArg(OPT_llvmlibthin))) {
+ /*WriteSymtab=*/true,
+ Thin ? object::Archive::K_GNU : object::Archive::K_COFF,
+ /*Deterministic*/ true, Thin)) {
handleAllErrors(std::move(E), [&](const ErrorInfoBase &EI) {
llvm::errs() << OutputPath << ": " << EI.message() << "\n";
});