3 # RUN: llvm-mc -triple x86_64-unknown-windows-msvc -filetype obj -o %T/object.obj %S/Inputs/object.s
5 # RUN: lld-link /dll /machine:x64 /def:%S/Inputs/named.def /out:%T/library.dll %T/object.obj /entry:f /subsystem:CONSOLE
6 # RUN: llvm-ar t %T/library.lib | FileCheck %s -check-prefix CHECK-DEFAULT-DLL-EXT
8 # RUN: lld-link /machine:x64 /def:%S/Inputs/named.def /out:%T/library.lib
9 # RUN: llvm-ar t %T/library.lib | FileCheck %s -check-prefix CHECK-DEFAULT-DLL-EXT
11 CHECK-DEFAULT-DLL-EXT: library.dll
12 CHECK-DEFAULT-DLL-EXT: library.dll
13 CHECK-DEFAULT-DLL-EXT: library.dll
14 CHECK-DEFAULT-DLL-EXT: library.dll
16 # RUN: lld-link /machine:x64 /def:%S/Inputs/named.def /out:%T/library.exe %T/object.obj /entry:f /subsystem:CONSOLE
17 # RUN: llvm-ar t %T/library.lib | FileCheck %s -check-prefix CHECK-DEFAULT-EXE-EXT
19 CHECK-DEFAULT-EXE-EXT: library.exe
20 CHECK-DEFAULT-EXE-EXT: library.exe
21 CHECK-DEFAULT-EXE-EXT: library.exe
22 CHECK-DEFAULT-EXE-EXT: library.exe
24 # RUN: lld-link /dll /machine:x64 /def:%S/Inputs/extension.def /out:%T/extension.dll /entry:f /subsystem:CONSOLE
25 # RUN: llvm-ar t %T/extension.lib | FileCheck %s -check-prefix CHECK-EXTENSION
27 # RUN: lld-link /machine:x64 /def:%S/Inputs/extension.def /out:%T/extension.exe /entry:f /subsystem:CONSOLE
28 # RUN: llvm-ar t %T/extension.lib | FileCheck %s -check-prefix CHECK-EXTENSION
30 # RUN: lld-link /machine:x64 /def:%S/Inputs/extension.def /out:%T/extension.lib
31 # RUN: llvm-ar t %T/extension.lib | FileCheck %s -check-prefix CHECK-EXTENSION
33 CHECK-EXTENSION: library.ext
34 CHECK-EXTENSION: library.ext
35 CHECK-EXTENSION: library.ext
36 CHECK-EXTENSION: library.ext
38 # RUN: lld-link /dll /machine:x64 /def:%S/Inputs/default.def /out:%T/default.dll /entry:f /subsystem:CONSOLE
39 # RUN: llvm-ar t %T/default.lib | FileCheck %s -check-prefix CHECK-OUTPUT-NAME-DLL
41 # RUN: lld-link /machine:x64 /def:%S/Inputs/default.def /out:%T/default.lib
42 # RUN: llvm-ar t %T/default.lib | FileCheck %s -check-prefix CHECK-OUTPUT-NAME-DLL
44 CHECK-OUTPUT-NAME-DLL: default.dll
45 CHECK-OUTPUT-NAME-DLL: default.dll
46 CHECK-OUTPUT-NAME-DLL: default.dll
47 CHECK-OUTPUT-NAME-DLL: default.dll
49 # RUN: lld-link /machine:x64 /def:%S/Inputs/default.def /out:%T/default.exe %T/object.obj /entry:f /subsystem:CONSOLE
50 # RUN: llvm-ar t %T/default.lib | FileCheck %s -check-prefix CHECK-OUTPUT-NAME-EXE
52 CHECK-OUTPUT-NAME-EXE: default.exe
53 CHECK-OUTPUT-NAME-EXE: default.exe
54 CHECK-OUTPUT-NAME-EXE: default.exe
55 CHECK-OUTPUT-NAME-EXE: default.exe
57 # RUN: lld-link /machine:x64 /out:%T/default.exe %T/object.obj /entry:f /subsystem:CONSOLE
58 # RUN: llvm-ar t %T/default.lib | FileCheck %s -check-prefix CHECK-NODEF-EXE
60 CHECK-NODEF-EXE: default.exe
61 CHECK-NODEF-EXE: default.exe
62 CHECK-NODEF-EXE: default.exe
63 CHECK-NODEF-EXE: default.exe
65 # RUN: lld-link /machine:x64 /dll /out:%T/default.dll %T/object.obj /entry:f /subsystem:CONSOLE
66 # RUN: llvm-ar t %T/default.lib | FileCheck %s -check-prefix CHECK-NODEF-DLL
68 CHECK-NODEF-DLL: default.dll
69 CHECK-NODEF-DLL: default.dll
70 CHECK-NODEF-DLL: default.dll
71 CHECK-NODEF-DLL: default.dll
73 # RUN: lld-link /nologo /machine:x64 /out:%T/exe %T/object.obj /entry:f /subsystem:CONSOLE