RUN: lld -flavor gnu -L%p/../elf/Inputs -lfnarchive --output-filetype=yaml --noinhibit-exec 2> %t.err RUN: FileCheck %s < %t.err RUN: lld -flavor gnu -L%p/../elf/Inputs --whole-archive -lfnarchive --output-filetype=yaml --noinhibit-exec 2> %t1.err RUN: FileCheck %s -check-prefix="WHOLEARCHIVE" < %t1.err RUN: lld -flavor gnu -L%p/../elf/Inputs --whole-archive --as-needed -lfnarchive --output-filetype=yaml --noinhibit-exec 2> %t2.err RUN: FileCheck %s -check-prefix="ASNEEDED" < %t2.err RUN: lld -flavor gnu --sysroot=%p/../elf -L=/Inputs -lfnarchive --output-filetype=yaml --noinhibit-exec 2> %t3.err RUN: FileCheck -check-prefix="SYSROOT" %s < %t3.err CHECK: Name : {{[^ ]+}}elf/Inputs{{[\\/]}}libfnarchive.a CHECK: Type : ELF File CHECK: Ordinal : 0 CHECK: Attributes : CHECK: - wholeArchive : false CHECK: - asNeeded : false CHECK: contextPath : CHECK: - {{[^ ]+}}elf/Inputs WHOLEARCHIVE: Name : {{[^ ]+}}elf/Inputs{{[\\/]}}libfnarchive.a WHOLEARCHIVE: Type : ELF File WHOLEARCHIVE: Ordinal : 0 WHOLEARCHIVE: Attributes : WHOLEARCHIVE: - wholeArchive : true WHOLEARCHIVE: - asNeeded : false WHOLEARCHIVE: contextPath : WHOLEARCHIVE: - {{[^ ]+}}elf/Inputs ASNEEDED: Name : {{[^ ]+}}elf/Inputs{{[\\/]}}libfnarchive.a ASNEEDED: Type : ELF File ASNEEDED: Ordinal : 0 ASNEEDED: Attributes : ASNEEDED: - wholeArchive : true ASNEEDED: - asNeeded : true ASNEEDED: contextPath : ASNEEDED: - {{[^ ]+}}elf/Inputs SYSROOT: Name : {{[^ ]+}}elf/Inputs{{[\\/]}}libfnarchive.a SYSROOT: Type : ELF File SYSROOT: Ordinal : 0 SYSROOT: Attributes : SYSROOT: - wholeArchive : false SYSROOT: - asNeeded : false SYSROOT: contextPath : SYSROOT: - =/Inputs