This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dlltool] Imply the target arch from a tool triple prefix
ClosedPublic

Authored by mstorsjo on Jun 14 2021, 3:40 AM.

Details

Summary

Also use the default LLVM target as default for dlltool. This
matches how GNU dlltool behaves; it is compiled with one default
target, which is used if no option is provided.

Extend the anonymous namespace in the implementation file instead
of using static functions.

Based on a patch by Mateusz Mikuła.

The effect of the default LLVM target, if neither the -m option
nor a tool triple prefix is provided, isn't tested, as we can't
make assumptions about what it set to.

(We could make the default be forced to one of the four supported
architectures if the default triple is another arch, and then just
test that llvm-dlltool without an -m option is able to produce an
import library, without checking the actual architecture though.)

Diff Detail

Event Timeline

mstorsjo created this revision.Jun 14 2021, 3:40 AM
mstorsjo requested review of this revision.Jun 14 2021, 3:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2021, 3:40 AM
mati865 accepted this revision.Jun 14 2021, 2:43 PM

Feels a bit like approving myself (which is only partially true) but I don't see any issues with the patch itself.

This revision is now accepted and ready to land.Jun 14 2021, 2:43 PM
This revision was landed with ongoing or failed builds.Jun 17 2021, 3:03 AM
This revision was automatically updated to reflect the committed changes.