1 # RUN: cp %p/Inputs/hello64.obj %T
2 # RUN: cp %p/Inputs/std64.lib %T
4 # RUN: not lld-link /out:%t.exe /entry:main /subsystem:console \
5 # RUN: hello64.obj /defaultlib:std64.lib >& %t.log
6 # RUN: FileCheck -check-prefix=CHECK1 %s < %t.log
8 # RUN: not lld-link /out:%t.exe /entry:main /subsystem:console \
9 # RUN: hello64 /defaultlib:std64.lib >& %t.log
10 # RUN: FileCheck -check-prefix=CHECK2 %s < %t.log
12 # RUN: lld-link /libpath:%T /out:%t.exe /entry:main \
13 # RUN: /subsystem:console hello64.obj /defaultlib:std64.lib \
14 # RUN: /nodefaultlib:std64.lib >& %t.log || true
15 # RUN: FileCheck -check-prefix=CHECK3 %s < %t.log
17 # RUN: lld-link /libpath:%T /out:%t.exe /entry:main \
18 # RUN: /subsystem:console hello64.obj /defaultlib:std64 \
19 # RUN: /nodefaultlib:std64.lib >& %t.log || true
20 # RUN: FileCheck -check-prefix=CHECK3 %s < %t.log
22 CHECK1: error: could not open hello64.obj: {{[Nn]}}o such file or directory
23 CHECK2: error: could not open hello64: {{[Nn]}}o such file or directory
24 CHECK3: error: {{.*}}hello64.obj: undefined symbol: MessageBoxA
26 # RUN: lld-link /libpath:%T /out:%t.exe /entry:main \
27 # RUN: /subsystem:console hello64.obj /defaultlib:std64.lib
29 # RUN: env LIB=%T lld-link /out:%t.exe /entry:main \
30 # RUN: /subsystem:console hello64.obj /defaultlib:std64.lib