Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / thin-archive.s
blob248209b3f336a91cea935935650ddedec20f15f1
1 # REQUIRES: x86
3 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/lib.o \
7 # RUN: %t/mangled-symbol.s
8 # RUN: llvm-ar csr %t/lib.a %t/lib.o
9 # RUN: llvm-ar csrT %t/lib_thin.a %t/lib.o
11 # RUN: %lld %t/main.o %t/lib.a -o %t/out
12 # RUN: llvm-nm %t/out
13 # RUN: %lld %t/main.o %t/lib_thin.a -o %t/out
14 # RUN: llvm-nm %t/out
15 # RUN: %lld %t/main.o -force_load %t/lib_thin.a -o %t/out
16 # RUN: llvm-nm %t/out
18 # RUN: rm %t/lib.o
19 # RUN: %lld %t/main.o %t/lib.a -o %t/out
20 # RUN: llvm-nm %t/out
21 # RUN: not %lld %t/main.o %t/lib_thin.a -demangle -o %t/out 2>&1 | \
22 # RUN: FileCheck --check-prefix=NOOBJ %s
23 # RUN: not %lld %t/main.o %t/lib_thin.a -o %t/out 2>&1 | \
24 # RUN: FileCheck --check-prefix=NOOBJNODEMANGLE %s
26 # CHECK: __Z1fv
27 # CHECK: _main
28 # NOOBJ: error: {{.*}}lib_thin.a: could not get the member defining symbol f(): '{{.*}}lib.o': {{[N|n]}}o such file or directory
29 # NOOBJNODEMANGLE: error: {{.*}}lib_thin.a: could not get the member defining symbol __Z1fv: '{{.*}}lib.o': {{[N|n]}}o such file or directory
31 #--- mangled-symbol.s
32 .globl __Z1fv
33 __Z1fv:
34 retq
36 #--- main.s
37 .global _main
38 _main:
39 callq __Z1fv
40 mov $0, %rax
41 retq