Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / invalid / archive-no-index.s
blob9cda945652500eb851ace1fceadc7cb9f1af56b0
1 # REQUIRES: x86
2 # RUN: rm -rf %t; split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/2.s -o %t/2.o
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/3.s -o %t/3.o
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/4.s -o %t/4.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o
8 # RUN: llvm-ar rcS %t/test.a %t/2.o %t/3.o %t/4.o
10 # RUN: not %lld %t/test.o %t/test.a -o /dev/null 2>&1 | FileCheck %s
11 # CHECK: error: {{.*}}.a: archive has no index; run ranlib to add one
13 #--- 2.s
14 .globl _boo
15 _boo:
16 ret
18 #--- 3.s
19 .globl _bar
20 _bar:
21 ret
23 #--- 4.s
24 .globl _undefined, _unused
25 _unused:
26 ret
28 #--- main.s
29 .global _main
30 _main:
31 mov $0, %rax
32 ret