1 ## Test the ADDLIB MRI command.
3 # RUN: rm -rf %t && mkdir -p %t
4 # RUN: yaml2obj %s -o %t/f.o
5 # RUN: llvm-ar r %t/f.a %t/f.o
7 ## Merge contents of archives.
8 # RUN: echo "CREATE %t/addlib.a" > %t/addlib.mri
9 # RUN: echo "ADDLIB %t/f.a" >> %t/addlib.mri
10 # RUN: echo "SAVE" >> %t/addlib.mri
11 # RUN: llvm-ar -M < %t/addlib.mri
12 # RUN: llvm-nm --print-armap %t/addlib.a | FileCheck --check-prefix=SYMS %s
13 # RUN: llvm-ar t %t/addlib.a | FileCheck --check-prefix=FILES %s
18 ## ADDLIB with non-archive file.
19 # RUN: echo "CREATE %t/badlib.a" > %t/badlib.mri
20 # RUN: echo "ADDLIB %s" >> %t/badlib.mri
21 # RUN: echo "SAVE" >> %t/badlib.mri
22 # RUN: not llvm-ar -M < %t/badlib.mri 2>&1 | FileCheck --check-prefix=PARSE %s
23 # RUN: not ls %t/badlib.a
25 # PARSE: Could not parse library
28 # RUN: echo "ADDLIB %t/f.a" > %t/nocreate.mri
29 # RUN: echo "SAVE" >> %t/nocreate.mri
30 # RUN: not llvm-ar -M < %t/nocreate.mri