1# RUN: ld64.lld -test_file_usage -v \
2# RUN:        -path_exists /usr/lib \
3# RUN:        -path_exists /Applications/MySDK/usr/local/lib \
4# RUN:        -path_exists /Applications/MySDK/usr/local/lib/libSystem.a \
5# RUN:        -path_exists /hasFoo \
6# RUN:        -path_exists /hasFoo/foo.o \
7# RUN:        -syslibroot /Applications/MySDK \
8# RUN:        -L/hasFoo \
9# RUN:        -lSystem -lfoo.o \
10# RUN: 2>&1 | FileCheck %s
11
12# When just one -syslibroot is specified, we apparently want to skip *system*
13# paths that aren't found. User ones should still get added. In this case
14# /usr/lib exists, but not the equivalent in the -syslibroot, so there should be
15# no mention of /usr/lib.
16
17# CHECK: Library search paths:
18# CHECK:     /hasFoo
19# CHECK-NOT:     /usr/lib
20# CHECK-NOT:     /usr/local/lib
21# CHECK:     /Applications/MySDK/usr/local/lib
22# CHECK-NOT:     /usr/lib
23# CHECK-NOT:     /usr/local/lib
24# CHECK: Found library /Applications/MySDK/usr/local/lib/libSystem.a
25# CHECK: Found library /hasFoo/foo.o
26