brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · fbf6b43 Raw
49 lines · plain
1# RUN: mkdir -p %t.dir2# RUN: cp %p/Inputs/hello64.obj %t.dir3# RUN: cp %p/Inputs/std64.lib %t.dir4 5# RUN: not lld-link /out:%t.exe /entry:main /subsystem:console \6# RUN:   hello64.obj /defaultlib:std64.lib >& %t.log7# RUN: FileCheck -DMSG=%errc_ENOENT -check-prefix=CHECK1 %s < %t.log8 9# RUN: not lld-link /out:%t.exe /entry:main /subsystem:console \10# RUN:   hello64 /defaultlib:std64.lib >& %t.log11# RUN: FileCheck -DMSG=%errc_ENOENT -check-prefix=CHECK2 %s < %t.log12 13# RUN: lld-link /libpath:%t.dir /out:%t.exe /entry:main \14# RUN:   /subsystem:console hello64.obj /defaultlib:std64.lib \15# RUN:   /nodefaultlib:std64.lib >& %t.log || true16# RUN: FileCheck -check-prefix=CHECK3 %s < %t.log17 18# RUN: lld-link /libpath:%t.dir /out:%t.exe /entry:main \19# RUN:   /subsystem:console hello64.obj /defaultlib:std64 \20# RUN:   /nodefaultlib:std64.lib >& %t.log || true21# RUN: FileCheck -check-prefix=CHECK3 %s < %t.log22 23CHECK1: error: could not open 'hello64.obj': [[MSG]]24CHECK2: error: could not open 'hello64': [[MSG]]25CHECK3: error: undefined symbol: MessageBoxA26CHECK3-NEXT: >>> referenced by {{.*}}hello64.obj:(main)27 28# RUN: lld-link /libpath:%t.dir /out:%t.exe /entry:main \29# RUN:   /subsystem:console hello64.obj /defaultlib:std64.lib30 31# RUN: env LIB=%t.dir lld-link /out:%t.exe /entry:main \32# RUN:   /subsystem:console hello64.obj /defaultlib:std64.lib33 34MSVC stamps uppercase references in OBJ directives, thus ensure that passing lowercase 'libcmt' and 'oldnames' to /nodefaultlib works.35# RUN: lld-link %S/Inputs/precomp.obj %S/Inputs/precomp-a.obj %S/Inputs/precomp-b.obj /nodefaultlib:libcmt /nodefaultlib:oldnames /entry:main /debug /pdb:%t.pdb /out:%t.exe /opt:ref /opt:icf36# RUN: llvm-pdbutil dump -modules %t.pdb | FileCheck %s -check-prefix UPPERCASE37 38UPPERCASE-NOT: OLDNAMES39UPPERCASE-NOT: LIBCMT40 41# RUN: yaml2obj -o %t.dir/defaultlib.obj %p/Inputs/defaultlib.yaml42# RUN: mkdir -p %t.dir/sysroot/VC/Tools/MSVC/1.1.1.1/lib/x6443# RUN: cp %p/Inputs/ret42.lib %t.dir/sysroot/VC/Tools/MSVC/1.1.1.1/lib/x64/default.lib44 45# RUN: lld-link /winsysroot:%t.dir/sysroot /out:%t.exe /entry:main /subsystem:console %t.dir/defaultlib.obj46# RUN: not lld-link /winsysroot:%t.dir/sysroot /out:%t.exe /entry:main /subsystem:console /nodefaultlib:default.lib %t.dir/defaultlib.obj 2>&1 | FileCheck -check-prefix=CHECK4 %s47 48CHECK4: error: <root>: undefined symbol: main49