llvm-capstone/lld/test/mach-o/libresolve-one-syslibroot.yaml
Nick Kledzik 94174f755c [mach-o] Support -filelist option in darwin driver
The darwin linker has an option, heavily used by Xcode, in which, instead
of listing all input files on the command line, the input file paths are
written to a text file and the path of that text file is passed to the linker
with the -filelist option (similar to @file).

In order to make test cases for this, I generalized the -test_libresolution
option to become -test_file_usage.

llvm-svn: 215762
2014-08-15 19:53:41 +00:00

26 lines
1020 B
YAML

# RUN: lld -flavor darwin -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