1REQUIRES: x86
2RUN: mkdir -p %t-out
3RUN: llvm-mc -triple x86_64-windows-gnu -filetype obj -o %t-out/object.obj %S/Inputs/object.s
4
5Check that linking without an explicit -implib doesn't produce any implib.
6
7First test that linking without -lldmingw does produce an implib, but when
8adding -lldmingw, it no longer is produced. And when it is explicitly named,
9it is created.
10
11RUN: rm -f %t-out/library.lib
12RUN: lld-link -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console
13RUN: test -f %t-out/library.lib
14
15RUN: rm -f %t-out/library.lib
16RUN: lld-link -lldmingw -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console
17RUN: not test -f %t-out/library.lib
18
19RUN: lld-link -lldmingw -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console -implib:%t-out/library.lib
20RUN: test -f %t-out/library.lib
21