48 lines · plain
1# UNSUPPORTED: system-aix2# RUN: rm -rf %t && mkdir -p %t/addlib/ && split-file %s %t3# RUN: cd %t4 5# RUN: yaml2obj %S/Inputs/elf.yaml -o %t/elf.o6# RUN: cp %t/elf.o %t/addlib/elf.o7# RUN: cp %t/elf.o %t/delete.o8 9# RUN: llvm-ar rc --thin addlib/thin.ar addlib/elf.o10# RUN: llvm-ar rc addlib/regular.ar addlib/elf.o11 12# RUN: llvm-ar -M < thin.script13# RUN: FileCheck -input-file=archive.ar %s --check-prefixes=THIN --implicit-check-not=delete.o --match-full-lines14 15# THIN: !<thin>16# THIN: elf.o/17# THIN-NEXT: addlib/elf.o/18 19# RUN: llvm-ar -M < thin-to-regular.script20# RUN: FileCheck -input-file=regular.ar %s --check-prefixes=REGULAR21 22# REGULAR: !<arch>23 24# RUN: not llvm-ar -M < regular-to-thin.script 2>&1 | FileCheck %s --check-prefix=ERROR25# RUN: not ls thin.ar26# ERROR: error: script line 2: cannot add a regular archive's contents to a thin archive27 28#--- thin.script29createthin archive.ar30addmod elf.o31addlib addlib/thin.ar32addmod delete.o33delete delete.o34save35end36 37#--- thin-to-regular.script38create regular.ar39addlib addlib/thin.ar40save41end42 43#--- regular-to-thin.script44createthin thin.ar45addlib addlib/regular.ar46save47end48