This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [MinGW] Add an lld specific option for requesting to delay load libraries
ClosedPublic

Authored by mstorsjo on Aug 4 2019, 1:22 PM.

Details

Summary

With GNU tools, delayload is handled completely differently. (One creates a specific delayload import library using dlltool and then links against it instead of the normal import library.)

Instead of requiring using -Xlink=-delayload:lib.dll, we can provide an lld specific option for this.

@jacek - If this one lands, do you need it in the 9.x release branch? (I might do an llvm-mingw release from that point release, but then move on back to latest trunk when there's other changes I need from there.)

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Aug 4 2019, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2019, 1:22 PM
ruiu accepted this revision.Aug 4 2019, 7:16 PM

LGTM

This revision is now accepted and ready to land.Aug 4 2019, 7:16 PM
This revision was automatically updated to reflect the committed changes.
jacek added a comment.Aug 6 2019, 8:27 AM

Thanks for doing that!

My patch for Wine using delayload is still under review, but I think Wine will better use -Xlink syntax to cover existing LLD versions for now anyway. Mozilla may use it right away, since they target their own toolchain build anyway: https://bugzilla.mozilla.org/show_bug.cgi?id=1570597

mstorsjo added a subscriber: hans.Aug 6 2019, 11:07 AM

My patch for Wine using delayload is still under review, but I think Wine will better use -Xlink syntax to cover existing LLD versions for now anyway. Mozilla may use it right away, since they target their own toolchain build anyway: https://bugzilla.mozilla.org/show_bug.cgi?id=1570597

Ok.

Despite this - @hans - do you think this one would be an acceptable backport? (Sorry for flooding you with all these, but I was a bit busy before the branch...)

hans added a comment.Aug 7 2019, 1:34 AM

My patch for Wine using delayload is still under review, but I think Wine will better use -Xlink syntax to cover existing LLD versions for now anyway. Mozilla may use it right away, since they target their own toolchain build anyway: https://bugzilla.mozilla.org/show_bug.cgi?id=1570597

Ok.

Despite this - @hans - do you think this one would be an acceptable backport? (Sorry for flooding you with all these, but I was a bit busy before the branch...)

Yes, sounds good to me. Merged in r368134.