llvm.org GIT mirror llvm / 377796a
Create BSD archives by default on OS X. They should probably be created on anything that is not windows or linux, but I will test on freebsd before changing that. With this it is possible to bootstrap with llvm-ar instead of ar+ranlib on OS X. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241849 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 4 years ago
2 changed file(s) with 10 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
77 RUN: echo -n zed. > 0123456789abcdef
88
99 RUN: rm -f test.a
10 RUN: llvm-ar rc test.a 0123456789abcde 0123456789abcdef
10 RUN: llvm-ar --format=gnu rc test.a 0123456789abcde 0123456789abcdef
1111 RUN: cat test.a | FileCheck -strict-whitespace %s
1212
1313 CHECK: !
1212 //===----------------------------------------------------------------------===//
1313
1414 #include "llvm/ADT/StringSwitch.h"
15 #include "llvm/ADT/Triple.h"
1516 #include "llvm/IR/LLVMContext.h"
1617 #include "llvm/IR/Module.h"
1718 #include "llvm/LibDriver/LibDriver.h"
551552 std::vector *NewMembersP) {
552553 object::Archive::Kind Kind;
553554 switch (FormatOpt) {
554 case Default:
555 // FIXME: change as the support for other formats improve.
556 Kind = object::Archive::K_GNU;
555 case Default: {
556 Triple T(sys::getProcessTriple());
557 if (T.isOSDarwin())
558 Kind = object::Archive::K_BSD;
559 else
560 Kind = object::Archive::K_GNU;
561 break;
562 }
557563 case GNU:
558564 Kind = object::Archive::K_GNU;
559565 break;