# RUN: ld64.lld -test_file_usage -v \
# RUN:        -path_exists /usr/lib \
# RUN:        -path_exists /Applications/MySDK/usr/local/lib \
# RUN:        -path_exists /Applications/MySDK/usr/local/lib/libSystem.a \
# RUN:        -path_exists /hasFoo \
# RUN:        -path_exists /hasFoo/foo.o \
# RUN:        -syslibroot /Applications/MySDK \
# RUN:        -L/hasFoo \
# RUN:        -lSystem -lfoo.o \
# RUN: 2>&1 | FileCheck %s

# When just one -syslibroot is specified, we apparently want to skip *system*
# paths that aren't found. User ones should still get added. In this case
# /usr/lib exists, but not the equivalent in the -syslibroot, so there should be
# no mention of /usr/lib.

# CHECK: Library search paths:
# CHECK:     /hasFoo
# CHECK-NOT:     /usr/lib
# CHECK-NOT:     /usr/local/lib
# CHECK:     /Applications/MySDK/usr/local/lib
# CHECK-NOT:     /usr/lib
# CHECK-NOT:     /usr/local/lib
# CHECK: Found library /Applications/MySDK/usr/local/lib/libSystem.a
# CHECK: Found library /hasFoo/foo.o
