RUN: echo -n zed. > 0123456789abcdef
RUN: rm -f test.a
-RUN: llvm-ar rc test.a 0123456789abcde 0123456789abcdef
+RUN: llvm-ar --format=gnu rc test.a 0123456789abcde 0123456789abcdef
RUN: cat test.a | FileCheck -strict-whitespace %s
CHECK: !<arch>
//===----------------------------------------------------------------------===//
#include "llvm/ADT/StringSwitch.h"
+#include "llvm/ADT/Triple.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/LibDriver/LibDriver.h"
std::vector<NewArchiveIterator> *NewMembersP) {
object::Archive::Kind Kind;
switch (FormatOpt) {
- case Default:
- // FIXME: change as the support for other formats improve.
- Kind = object::Archive::K_GNU;
+ case Default: {
+ Triple T(sys::getProcessTriple());
+ if (T.isOSDarwin())
+ Kind = object::Archive::K_BSD;
+ else
+ Kind = object::Archive::K_GNU;
+ break;
+ }
case GNU:
Kind = object::Archive::K_GNU;
break;