This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dlltool] Remove support for implying output name
ClosedPublic

Authored by mstorsjo on Aug 2 2019, 4:32 AM.

Details

Summary

I don't see GNU dlltool supporting doing this; with only a -d option and no -l option, GNU dlltool runs successfully but doesn't output anything.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Aug 2 2019, 4:32 AM

For the record, while this might look like a surprising patch (removing functionality, why?), I noticed this while looking into the dlltool option -y (for generating a delayload import library). Dlltool has the options -l for specifying the output name of a normal import library, and the option -y for specifying the output name of a delayload import library. If using the -y option only, the current behaviour of implicitly picking an output name and writing to it, if no -l option was specified, seemed odd, and I noticed that GNU dlltool didn't actually have that behaviour.

(I don't have anything upstream-worthy regarding actually implementing the -y option in dlltool; the sole user so far, wine, managed to work around it and use the lld delayload option instead.)

ruiu accepted this revision.Sep 2 2019, 3:14 AM

LGTM

lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
168–169 ↗(On Diff #213016)

Nit: you can combine these two if with &&

This revision is now accepted and ready to land.Sep 2 2019, 3:14 AM
This revision was automatically updated to reflect the committed changes.