xref: /llvm-project/lld/test/COFF/noimplib.test (revision eb4eef9ec4e5c4869aa76295a10e422f54951214)
1REQUIRES: x86
2RUN: mkdir -p %t-out
3RUN: llvm-mc -triple x86_64-windows-msvc -filetype obj -o %t-out/object.obj %S/Inputs/object.s
4
5Test that /noimplib writes no .lib file
6
7RUN: rm -f %t-out/library.lib
8RUN: lld-link -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console /noimplib
9RUN: not test -f %t-out/library.lib
10
11Just make sure the normal stuff works and then we just add /noimplib
12
13RUN: lld-link -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console /implib:%t-out/nolibrary.lib
14RUN: test -f %t-out/nolibrary.lib
15
16Test that it overrides /implib as well. This is how link.exe works
17
18RUN: rm -f %t-out/nolibrary.lib
19RUN: lld-link -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console /implib:%t-out/nolibrary.lib /noimplib
20RUN: not test -f %t-out/nolibrary.lib
21