llvm-project/lld/test/COFF/noimplib.test
Tobias Hieta eb4eef9ec4 [LLD][COFF] Add support for /noimplib
Mostly for compatibility reasons with link.exe this flag
makes sure we don't write a implib - not even when /implib
is also passed, that's how link.exe works.

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D123591
2022-04-13 10:32:44 +02:00

21 lines
941 B
Plaintext

REQUIRES: x86
RUN: mkdir -p %t-out
RUN: llvm-mc -triple x86_64-windows-msvc -filetype obj -o %t-out/object.obj %S/Inputs/object.s
Test that /noimplib writes no .lib file
RUN: rm -f %t-out/library.lib
RUN: lld-link -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console /noimplib
RUN: not test -f %t-out/library.lib
Just make sure the normal stuff works and then we just add /noimplib
RUN: 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
RUN: test -f %t-out/nolibrary.lib
Test that it overrides /implib as well. This is how link.exe works
RUN: rm -f %t-out/nolibrary.lib
RUN: 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
RUN: not test -f %t-out/nolibrary.lib