1RUN: yaml2obj %S/Inputs/macho.yaml -o %t-macho.o
2RUN: yaml2obj %S/Inputs/coff.yaml -o %t-coff.o
3
4RUN: rm -f %t.ar
5RUN: llvm-ar crs %t.ar %t-macho.o
6RUN: grep -q __.SYMDEF %t.ar
7Test that an option string prefixed by a dash works.
8RUN: llvm-ar -crs %t.ar %t-coff.o
9RUN: grep -q __.SYMDEF %t.ar
10
11RUN: rm -f %t.ar
12RUN: llvm-ar crs %t.ar %t-coff.o
13RUN: not grep -q __.SYMDEF %t.ar
14RUN: llvm-ar crs %t.ar %t-macho.o
15RUN: not grep -q __.SYMDEF %t.ar
16
17RUN: rm -f %t.ar
18Test that multiple dashed options works.
19RUN: llvm-ar -c -r -s %t.ar %t-macho.o
20RUN: grep -q __.SYMDEF %t.ar
21Test with duplicated options.
22RUN: llvm-ar -c -r -s -c -s %t.ar %t-coff.o
23RUN: grep -q __.SYMDEF %t.ar
24
25RUN: rm -f %t.ar
26Test with the options in a different order.
27RUN: llvm-ar rsc %t.ar %t-macho.o
28RUN: grep -q __.SYMDEF %t.ar
29Test with options everywhere.
30RUN: llvm-ar rsc -cs -sc %t.ar %t-coff.o -cs -sc
31RUN: grep -q __.SYMDEF %t.ar
32
33Ensure that we select the existing format when updating.
34
35