From a2ed0b0babca5c82ac547feb1502e7392db98066 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 8 Jul 2015 20:47:32 +0000 Subject: Start adding support for writing archives in BSD format. No support for the symbol table yet (but will hopefully add it today). We always use the long filename format so that we can align the member, which is an advantage of the BSD format. llvm-svn: 241721 --- llvm/lib/LibDriver/LibDriver.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/LibDriver/LibDriver.cpp') diff --git a/llvm/lib/LibDriver/LibDriver.cpp b/llvm/lib/LibDriver/LibDriver.cpp index bc3ed46..4a9fa28 100644 --- a/llvm/lib/LibDriver/LibDriver.cpp +++ b/llvm/lib/LibDriver/LibDriver.cpp @@ -139,8 +139,10 @@ int llvm::libDriverMain(llvm::ArrayRef ArgsArr) { llvm::sys::path::filename(Arg->getValue())); } - std::pair Result = llvm::writeArchive( - getOutputPath(&Args, Members[0]), Members, /*WriteSymtab=*/true); + std::pair Result = + llvm::writeArchive(getOutputPath(&Args, Members[0]), Members, + /*WriteSymtab=*/true, object::Archive::K_GNU); + if (Result.second) { if (Result.first.empty()) Result.first = ArgsArr[0]; -- cgit v1.1