[PATCH] D104212: [llvm-dlltool] Imply the target arch from a tool triple prefix

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 03:40:39 PDT 2021


mstorsjo created this revision.
mstorsjo added reviewers: rnk, mati865.
Herald added subscribers: ormris, steven_wu, hiraditya, inglorion.
mstorsjo requested review of this revision.
Herald added a project: LLVM.

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.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104212

Files:
  llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
  llvm/test/tools/llvm-dlltool/triple-prefix.def

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104212.351815.patch
Type: text/x-patch
Size: 4799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210614/29e1c1c0/attachment.bin>


More information about the llvm-commits mailing list