]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/COFF/nodefaultlib.test
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / COFF / nodefaultlib.test
1 # RUN: cp %p/Inputs/hello64.obj %T
2 # RUN: cp %p/Inputs/std64.lib %T
3
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
7
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
11
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
16
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
21
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: undefined symbol: MessageBoxA
25 CHECK3-NEXT: >>> referenced by {{.*}}hello64.obj:(main)
26
27 # RUN: lld-link /libpath:%T /out:%t.exe /entry:main \
28 # RUN:   /subsystem:console hello64.obj /defaultlib:std64.lib
29
30 # RUN: env LIB=%T lld-link /out:%t.exe /entry:main \
31 # RUN:   /subsystem:console hello64.obj /defaultlib:std64.lib