1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/tools/llvm-ar/mri-thin-archive.test
Owen Reynolds 13d4e5db43 [llvm-ar] Create thin archives with MRI scripts
This patch implements the "CREATE_THIN" MRI script command, allowing thin archives to be created via MRI scripts. 

Differential Revision: https://reviews.llvm.org/D62919

llvm-svn: 362704
2019-06-06 13:19:50 +00:00

24 lines
667 B
Plaintext

RUN: rm -rf %t && mkdir -p %t/addlib/
RUN: yaml2obj %S/Inputs/elf.yaml -o %t/elf.o
RUN: cp %t/elf.o %t/addlib/elf.o
RUN: cp %t/elf.o %t/delete.o
RUN: cd %t && llvm-ar rTc addlib/addlib.ar addlib/elf.o
RUN: echo "createthin %t/archive.ar" > %t/mri.script
RUN: echo "addmod elf.o" >> %t/mri.script
RUN: echo "addlib addlib/addlib.ar" >> %t/mri.script
RUN: echo "addmod delete.o" >> %t/mri.script
RUN: echo "delete delete.o" >> %t/mri.script
RUN: echo "save" >> %t/mri.script
RUN: echo "end" >> %t/mri.script
RUN: cd %t && llvm-ar -M < mri.script
RUN: FileCheck -input-file=%t/archive.ar %s
CHECK: !<thin>
CHECK: elf.o
CHECK-NEXT: addlib/elf.o/
CHECK-NOT: delete.o