Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / link-search-at-rpath.s
blobdbc0d4b3cbf6325f4677d16f8c9521041410172b
1 # REQUIRES: x86
3 # RUN: rm -rf %t; split-file %s %t
4 # RUN: mkdir %t/subdir
5 # RUN: mkdir %t/subdir2
7 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/foo.s -o %t/foo.o
8 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/bar.s -o %t/bar.o
9 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/main.s -o %t/main.o
11 # RUN: %lld -dylib -install_name @rpath/libfoo.dylib %t/foo.o -o %t/subdir/libfoo.dylib
13 # RUN: %lld -dylib -reexport_library %t/subdir/libfoo.dylib \
14 # RUN: -rpath @loader_path/../foo \
15 # RUN: -rpath @loader_path/../subdir \
16 # RUN: -rpath @loader_path/../foo \
17 # RUN: %t/bar.o -o %t/subdir2/libbar.dylib
19 # RUN: %lld -lSystem %t/main.o %t/subdir2/libbar.dylib -o %t/test
20 # RUN: %lld -dylib -lSystem %t/main.o %t/subdir2/libbar.dylib -o %t/libtest.dylib
22 #--- foo.s
23 .globl _foo
24 _foo:
25 retq
27 #--- bar.s
28 .globl _bar
29 _bar:
30 retq
32 #--- main.s
33 .section __TEXT,__text
34 .global _main
35 _main:
36 callq _foo
37 callq _bar
38 ret