This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [MinGW] Support creating DLLs with a def file
ClosedPublic

Authored by mstorsjo on Sep 12 2017, 1:22 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Sep 12 2017, 1:22 PM
ruiu edited edge metadata.Sep 12 2017, 1:36 PM

I wonder if MSVC link.exe automatically detects .def files as well. If so, we need to implement the same feature to COFF instead of tweaking the MinGW driver.

In D37761#868521, @ruiu wrote:

I wonder if MSVC link.exe automatically detects .def files as well. If so, we need to implement the same feature to COFF instead of tweaking the MinGW driver.

Doesn't seem so:

$ link -dll -out:lib.dll lib.obj lib.def
Microsoft (R) Incremental Linker Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.

lib.def : fatal error LNK1107: invalid or corrupt file: cannot read at 0x1E
ruiu accepted this revision.Sep 12 2017, 1:56 PM

Thank you for checking. LGTM.

This revision is now accepted and ready to land.Sep 12 2017, 1:56 PM
This revision was automatically updated to reflect the committed changes.