1# REQUIRES: x86 2# RUN: mkdir -p %T 3# RUN: llvm-mc -triple x86_64-unknown-windows-msvc -filetype obj -o %T/object.obj %S/Inputs/object.s 4 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 7 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 10 11CHECK-DEFAULT-DLL-EXT: library.dll 12CHECK-DEFAULT-DLL-EXT: library.dll 13CHECK-DEFAULT-DLL-EXT: library.dll 14CHECK-DEFAULT-DLL-EXT: library.dll 15 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 18 19CHECK-DEFAULT-EXE-EXT: library.exe 20CHECK-DEFAULT-EXE-EXT: library.exe 21CHECK-DEFAULT-EXE-EXT: library.exe 22CHECK-DEFAULT-EXE-EXT: library.exe 23 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 26 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 29 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 32 33CHECK-EXTENSION: library.ext 34CHECK-EXTENSION: library.ext 35CHECK-EXTENSION: library.ext 36CHECK-EXTENSION: library.ext 37 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 40 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 43 44CHECK-OUTPUT-NAME-DLL: default.dll 45CHECK-OUTPUT-NAME-DLL: default.dll 46CHECK-OUTPUT-NAME-DLL: default.dll 47CHECK-OUTPUT-NAME-DLL: default.dll 48 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 51 52CHECK-OUTPUT-NAME-EXE: default.exe 53CHECK-OUTPUT-NAME-EXE: default.exe 54CHECK-OUTPUT-NAME-EXE: default.exe 55CHECK-OUTPUT-NAME-EXE: default.exe 56 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 59 60CHECK-NODEF-EXE: default.exe 61CHECK-NODEF-EXE: default.exe 62CHECK-NODEF-EXE: default.exe 63CHECK-NODEF-EXE: default.exe 64 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 67 68CHECK-NODEF-DLL: default.dll 69CHECK-NODEF-DLL: default.dll 70CHECK-NODEF-DLL: default.dll 71CHECK-NODEF-DLL: default.dll 72 73