[PATCH] D87418: [LLD] Allow configuring default ld.lld backend

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 13:45:53 PDT 2020


mstorsjo added a comment.

In D87418#2266652 <https://reviews.llvm.org/D87418#2266652>, @pcc wrote:

> How widespread are these build systems that parse help output? (Given that it took until now to discover them, I'd venture "not very".) Maybe it would be better to fix them to explicitly pass `-m` and/or do something that doesn't rely on parsing help output (e.g. just try the flag and see whether it fails).

Well, lld on mingw is not very widely used yet - this has been long known (and I think the primary build system that does this is libtool, which is essentially unmaintained at this point).

In my llvm-mingw distribution I use a small wrapper around lld that passes -m, but for e.g. msys2, it would make sense to have an ld.lld.exe that on its own, without any options, defaults to the local native target, and would work just like ld.bfd.exe (which afaik works without an -m option) in that sense. Although in practice, except for such probing, most use of the linker is via the compiler driver...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87418/new/

https://reviews.llvm.org/D87418



More information about the llvm-commits mailing list