Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / link-search-at-loader-path.s
blob96ed266fa91c6c3012bf5efb52ffa821be784dc5
1 # REQUIRES: x86
3 # RUN: rm -rf %t; split-file %s %t
4 # RUN: mkdir %t/subdir
6 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/foo.s -o %t/foo.o
7 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/bar.s -o %t/bar.o
8 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/main.s -o %t/main.o
10 # RUN: %lld -dylib -install_name @loader_path/libfoo.dylib %t/foo.o -o %t/subdir/libfoo.dylib
12 ## Test that @loader_path is replaced by the actual path, not by install_name.
13 # RUN: %lld -dylib -reexport_library %t/subdir/libfoo.dylib -install_name /tmp/libbar.dylib %t/bar.o -o %t/subdir/libbar.dylib
15 # RUN: %lld -lSystem %t/main.o %t/subdir/libbar.dylib -o %t/test
16 # RUN: %lld -dylib -lSystem %t/main.o %t/subdir/libbar.dylib -o %t/libtest.dylib
18 #--- foo.s
19 .globl _foo
20 _foo:
21 retq
23 #--- bar.s
24 .globl _bar
25 _bar:
26 retq
28 #--- main.s
29 .section __TEXT,__text
30 .global _main
31 _main:
32 callq _foo
33 callq _bar
34 ret