summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index e0bd7d21dbc..ae70b2ce642 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -585,7 +585,7 @@ performWriteOperation(ArchiveOperation Operation, object::Archive *OldArchive,
switch (FormatOpt) {
case Default: {
Triple T(sys::getProcessTriple());
- if (T.isOSDarwin())
+ if (T.isOSDarwin() && !Thin)
Kind = object::Archive::K_BSD;
else
Kind = object::Archive::K_GNU;
@@ -595,6 +595,8 @@ performWriteOperation(ArchiveOperation Operation, object::Archive *OldArchive,
Kind = object::Archive::K_GNU;
break;
case BSD:
+ if (Thin)
+ fail("Only the gnu format has a thin mode");
Kind = object::Archive::K_BSD;
break;
}
OpenPOWER on IntegriCloud