1# REQUIRES: x86 2# RUN: rm -rf %t; split-file %s %t 3 4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s 5# RUN: %lld -dylib -o %t/libfoo.dylib %t/foo.o 6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/bar.o %t/bar.s 7# RUN: llvm-ar csr %t/bar.a %t/bar.o 8# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s 9 10# RUN: %lld %t/main.o %t/bar.a %t/libfoo.dylib -lSystem -o %t/test.out -dependency_info %t/deps_info.out 11# RUN: %python %S/Inputs/DependencyDump.py %t/deps_info.out | FileCheck %s 12 13# CHECK: lld-version: {{.*}}LLD {{.*}} 14 15# CHECK-DAG: input-file: {{.*}}{{[/\]}}bar.a 16# CHECK-DAG: input-file: {{.*}}{{[/\]}}libfoo.dylib 17# CHECK-DAG: input-file: {{.*}}{{[/\]}}libSystem.tbd 18# CHECK-DAG: input-file: {{.*}}{{[/\]}}main.o 19# CHECK-DAG: input-file: {{.*}}bar.o 20 21# CHECK: not-found: {{.*}}{{[/\]}}libdyld.{{.*}} 22## There could be more not-found here but we are not checking those because it's brittle. 23 24# CHECK: output-file: {{.*}}{{[/\]}}test.out 25 26#--- foo.s 27.globl __Z3foo 28__Z3foo: 29 ret 30 31#--- bar.s 32.globl _bar 33_bar: 34 callq __Z3foo 35 ret 36 37#--- main.s 38.globl _main 39_main: 40 callq _bar 41 callq __Z3foo 42 ret 43