summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-ar/default-add.test
blob: 460965ac30582dae65e6f0a447bb86277196a647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
RUN: yaml2obj %S/Inputs/macho.yaml -o %t-macho.o
RUN: yaml2obj %S/Inputs/coff.yaml -o %t-coff.o

RUN: rm -f %t.ar
RUN: llvm-ar crs %t.ar %t-macho.o
RUN: grep -q __.SYMDEF %t.ar
Test that an option string prefixed by a dash works.
RUN: llvm-ar -crs %t.ar %t-coff.o
RUN: grep -q __.SYMDEF %t.ar

RUN: rm -f %t.ar
RUN: llvm-ar crs %t.ar %t-coff.o
RUN: not grep -q __.SYMDEF %t.ar
RUN: llvm-ar crs %t.ar %t-macho.o
RUN: not grep -q __.SYMDEF %t.ar

RUN: rm -f %t.ar
Test that multiple dashed options works.
RUN: llvm-ar -c -r -s %t.ar %t-macho.o
RUN: grep -q __.SYMDEF %t.ar
Test with duplicated options.
RUN: llvm-ar -c -r -s -c -s %t.ar %t-coff.o
RUN: grep -q __.SYMDEF %t.ar

RUN: rm -f %t.ar
Test with the options in a different order.
RUN: llvm-ar rsc %t.ar %t-macho.o
RUN: grep -q __.SYMDEF %t.ar
Test with options everywhere.
RUN: llvm-ar rsc -cs -sc %t.ar %t-coff.o -cs -sc
RUN: grep -q __.SYMDEF %t.ar

Ensure that we select the existing format when updating.

OpenPOWER on IntegriCloud