llvm-project
40 строк · 1.9 Кб
1# RUN: not lld-link nosuchfile.obj >& %t.log
2# RUN: FileCheck -DMSG=%errc_ENOENT -check-prefix=MISSING %s < %t.log
3MISSING: 'nosuchfile.obj': [[MSG]]
4
5# RUN: lld-link --version | FileCheck -check-prefix=VERSION %s
6VERSION: {{LLD [0-9]+\.[0-9]+}}
7
8# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj
9# RUN: lld-link /out:%t.dll /dll %t.obj
10# RUN: not lld-link /out:%t.exe %t.dll 2>&1 | FileCheck -check-prefix=BADFILE %s
11BADFILE: bad file type. Did you specify a DLL instead of an import library?
12
13# RUN: lld-link /lib /help | FileCheck -check-prefix=LIBHELP %s
14# RUN: lld-link -lib -help | FileCheck -check-prefix=LIBHELP %s
15LIBHELP: OVERVIEW: LLVM Lib
16
17# RUN: env LLD_IN_TEST=1 not lld-link /WX /lib 2>&1 | FileCheck -check-prefix=LIBBAD %s
18LIBBAD: ignoring /lib since it's not the first argument
19
20# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
21# RUN: not lld-link /out:/ %t.obj 2>&1 | FileCheck -check-prefix=DIR %s
22DIR: cannot open output file
23
24# RUN: env LLD_IN_TEST=1 not lld-link -version 2>&1 | FileCheck -check-prefix=SPELLVERSION %s
25SPELLVERSION: ignoring unknown argument '-version', did you mean '--version'
26SPELLVERSION: no input files
27
28# RUN: env LLD_IN_TEST=1 not lld-link -nodefaultlibs 2>&1 | FileCheck -check-prefix=SPELLNODEFAULTLIB %s
29SPELLNODEFAULTLIB: ignoring unknown argument '-nodefaultlibs', did you mean '-nodefaultlib'
30SPELLNODEFAULTLIB: no input files
31
32# RUN: not lld-link /nodefaultlibs 2>&1 | FileCheck -check-prefix=SPELLNODEFAULTLIB_SLASH %s
33SPELLNODEFAULTLIB_SLASH: could not open '/nodefaultlibs': {{.*}}; did you mean '/nodefaultlib'
34SPELLNODEFAULTLIB_SLASH-NOT: no input files
35
36# Getting flags as typo corrections for normal input files is a side effect
37# of how spell checking for /-style flags is implemented.
38# RUN: not lld-link force 2>&1 | FileCheck -check-prefix=SPELLFORCE %s
39SPELLFORCE: could not open 'force': {{.*}}; did you mean '/force'
40SPELLFORCE-NOT: no input files
41