Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
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 |