1 ## Test the s and S modifiers. Build and do not build a symbol table.
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: touch %t-other.txt
7 # RUN: rm -f %t-default.a
8 # RUN: llvm-ar rc %t-default.a %t.o
9 # RUN: llvm-nm --print-armap %t-default.a \
10 # RUN: | FileCheck %s --check-prefix=SYMTAB
13 # RUN: rm -f %t-symtab.a
14 # RUN: llvm-ar rcs %t-symtab.a %t.o
15 # RUN: llvm-nm --print-armap %t-symtab.a \
16 # RUN: | FileCheck %s --check-prefix=SYMTAB
18 # RUN: rm -f %t-no-symtab.a
19 # RUN: llvm-ar rcS %t-no-symtab.a %t.o
20 # RUN: llvm-nm --print-armap %t-no-symtab.a \
21 # RUN: | FileCheck %s --check-prefix=NO-SYMTAB
24 # RUN: rm -f %t-symtab-last.a
25 # RUN: llvm-ar rcSs %t-symtab-last.a %t.o
26 # RUN: llvm-nm --print-armap %t-symtab-last.a \
27 # RUN: | FileCheck %s --check-prefix=SYMTAB
29 # RUN: rm -f %t-no-symtab-last.a
30 # RUN: llvm-ar rcsS %t-no-symtab-last.a %t.o
31 # RUN: llvm-nm --print-armap %t-no-symtab-last.a \
32 # RUN: | FileCheck %s --check-prefix=NO-SYMTAB
34 ## Use an existing archive:
35 # RUN: rm -f %t-to-symtab.a
36 # RUN: llvm-ar rcS %t-to-symtab.a %t.o
37 # RUN: llvm-ar rs %t-to-symtab.a %t-other.txt
38 # RUN: llvm-nm --print-armap %t-to-symtab.a \
39 # RUN: | FileCheck %s --check-prefix=SYMTAB
41 # RUN: llvm-ar rs %t-to-symtab.a %t-other.txt
42 # RUN: llvm-nm --print-armap %t-to-symtab.a \
43 # RUN: | FileCheck %s --check-prefix=SYMTAB
45 # RUN: rm -f %t-to-no-symtab.a
46 # RUN: llvm-ar rcs %t-to-no-symtab.a %t.o
47 # RUN: llvm-ar rS %t-to-no-symtab.a %t-other.txt
48 # RUN: llvm-nm --print-armap %t-to-no-symtab.a \
49 # RUN: | FileCheck %s --check-prefix=NO-SYMTAB
51 # RUN: llvm-ar rS %t-to-no-symtab.a %t-other.txt
52 # RUN: llvm-nm --print-armap %t-to-no-symtab.a \
53 # RUN: | FileCheck %s --check-prefix=NO-SYMTAB
56 # NO-SYMTAB-NOT: symbol in