Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COFF] Require an explicit -implib option for creating implibs in min…
…gw mode GNU ld doesn't produce implibs unless explicitly requested. Differential Revision: https://reviews.llvm.org/D66367 llvm-svn: 369363
- Loading branch information
Showing
2 changed files
with
24 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
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-gnu -filetype obj -o %t-out/object.obj %S/Inputs/object.s | ||
|
||
Check that linking without an explicit -implib doesn't produce any implib. | ||
|
||
First test that linking without -lldmingw does produce an implib, but when | ||
adding -lldmingw, it no longer is produced. And when it is explicitly named, | ||
it is created. | ||
|
||
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 | ||
RUN: test -f %t-out/library.lib | ||
|
||
RUN: rm -f %t-out/library.lib | ||
RUN: lld-link -lldmingw -dll -machine:x64 -def:%S/Inputs/named.def -out:%t-out/library.dll %t-out/object.obj -entry:f -subsystem:console | ||
RUN: not test -f %t-out/library.lib | ||
|
||
RUN: 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 | ||
RUN: test -f %t-out/library.lib |