blob: 460965ac30582dae65e6f0a447bb86277196a647 [file] [log] [blame]
Chris Bieneman8ff0c112016-06-27 19:53:53 +00001RUN: yaml2obj %S/Inputs/macho.yaml -o %t-macho.o
2RUN: yaml2obj %S/Inputs/coff.yaml -o %t-coff.o
Saleem Abdulrasool92d33bd2016-06-25 03:05:56 +00003
4RUN: rm -f %t.ar
5RUN: llvm-ar crs %t.ar %t-macho.o
6RUN: grep -q __.SYMDEF %t.ar
Martin Storsjo1a9593b2017-11-03 20:09:10 +00007Test that an option string prefixed by a dash works.
8RUN: llvm-ar -crs %t.ar %t-coff.o
Saleem Abdulrasool92d33bd2016-06-25 03:05:56 +00009RUN: 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
Peter Collingbourned579c312018-03-28 17:21:14 +000017RUN: 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
Saleem Abdulrasool92d33bd2016-06-25 03:05:56 +000033Ensure that we select the existing format when updating.
34