[PATCH] D38972: Add the /v option which prints out the LLD version string.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 14:20:09 PDT 2017


mstorsjo added a comment.

FWIW, I've got code elsewhere that detects lld-link, that looks like this:

https://git.libav.org/?p=libav.git;a=blob;f=configure;h=e45b3201fc9a92acd7ff71778b67d227e4178297;hb=1c5f264787b1c1cf67e5e71d08b8d8b03b0c8248#l3380

  elif $_cc -? 2>/dev/null | grep -q 'LLVM.*Linker'; then

and then for getting the actual version from that linker:

  _ident=$($_cc -flavor gnu --version 2>/dev/null)

Once this goes in, at least the first test needs to be adjusted, in case I want the code to work both with LLD <= 5.0 and >= 6.0.


https://reviews.llvm.org/D38972





More information about the llvm-commits mailing list