1 # RUN: mkdir -p %t/a %t/b %t/c
2 # 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/
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.log
9 # RUN: FileCheck -check-prefix=CHECK1 %s < %t.log
11 CHECK1: b{{[/\\]}}std64.lib
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.log
16 # RUN: FileCheck -check-prefix=CHECK2 %s < %t.log
18 CHECK2: a{{[/\\]}}std64.lib
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>&1
23 # RUN: FileCheck -check-prefix=CHECK3 %s < %t.log
25 CHECK3: Reading {{.*}}a/std64.lib
26 CHECK3-NOT: Reading {{.*}}b/std64.lib
28 # RUN: env LIB=%t/a lld-link /out:%t.exe /entry:main /verbose \
29 # RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \
31 # RUN: FileCheck -check-prefix=CHECK4 %s < %t.log
33 CHECK4: a{{[/\\]}}std64.lib
35 # This should fail because /lldignoreenv should make lld-link
36 # 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 \