40 lines · plain
1# RUN: mkdir -p %t/a %t/b %t/c2# RUN: cp %p/Inputs/std64.lib %t/a/3# RUN: cp %p/Inputs/std64.lib %t/b/4# RUN: cp %p/Inputs/std64.lib %t/c/5 6# RUN: env LIB=%t/a lld-link /out:%t.exe /entry:main /verbose \7# RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \8# RUN: /libpath:%t/b /libpath:%t/c 2> %t.log9# RUN: FileCheck -check-prefix=CHECK1 %s < %t.log10 11CHECK1: b{{[/\\]}}std64.lib12 13# RUN: lld-link /out:%t.exe /entry:main /verbose \14# RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \15# RUN: /libpath:%t/a /libpath:%t/b /libpath:%t/c 2> %t.log16# RUN: FileCheck -check-prefix=CHECK2 %s < %t.log17 18CHECK2: a{{[/\\]}}std64.lib19 20# RUN: lld-link /out:%t.exe /entry:main /verbose \21# RUN: %t/a/std64.lib /subsystem:console %p/Inputs/hello64.obj \22# RUN: /libpath:%t/b /verbose > %t.log 2>&123# RUN: FileCheck -check-prefix=CHECK3 %s < %t.log24 25CHECK3: Reading {{.*}}a/std64.lib26CHECK3-NOT: Reading {{.*}}b/std64.lib27 28# RUN: env LIB=%t/a lld-link /out:%t.exe /entry:main /verbose \29# RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \30# RUN: 2> %t.log31# RUN: FileCheck -check-prefix=CHECK4 %s < %t.log32 33CHECK4: a{{[/\\]}}std64.lib34 35# This should fail because /lldignoreenv should make lld-link36# ignore the LIB env var.37# RUN: env LIB=%t/a not lld-link /out:%t.exe /entry:main /verbose \38# RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \39# RUN: /lldignoreenv40