Skip to content

Commit 0c6b29f

Browse files
committed
[LLD] [MinGW] Reinstate the former spelling in the version message
0f9fbbb changed the version printouts. This broke linker detection in Meson, when disambiguating between the ld.lld and lld-link interfaces, in https://github.com/mesonbuild/meson/blob/1.4.1/mesonbuild/linkers/detect.py#L67, which checks for the string "(compatible with GNU linkers)" including the parentheses. Reinstate the parentheses in the printout here, for compatibility with Meson. The printout looks a little odd in this form, "LLD 19.0.0 (https://github.com/llvm/llvm-project 173514d) (compatible with GNU linkers)", but works with Meson. The Meson check should ideally be loosened. But even then, we should only change LLD to the new form once older versions of Meson aren't used for these targets any longer, i.e. earliest within a few years.
1 parent c1a5f1e commit 0c6b29f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lld/MinGW/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
199199
// a GNU compatible linker. As long as an output for the -v option
200200
// contains "GNU" or "with BFD", they recognize us as GNU-compatible.
201201
if (args.hasArg(OPT_v) || args.hasArg(OPT_version))
202-
message(getLLDVersion() + ", compatible with GNU linkers");
202+
message(getLLDVersion() + " (compatible with GNU linkers)");
203203

204204
// The behavior of -v or --version is a bit strange, but this is
205205
// needed for compatibility with GNU linkers.

lld/test/MinGW/driver.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ APPCONTAINER: -appcontainer
268268
RUN: ld.lld -m i386pep --version 2>&1 | FileCheck -check-prefix=VERSION %s
269269
RUN: ld.lld -m i386pep -v 2>&1 | FileCheck -check-prefix=VERSION %s
270270
RUN: not ld.lld -m i386pep -v xyz 2>&1 | FileCheck -check-prefix=VERSION %s
271-
VERSION: LLD {{.*}}, compatible with GNU linkers
271+
VERSION: LLD {{.*}} (compatible with GNU linkers)
272272

273273
RUN: ld.lld -m i386pep --help 2>&1 | FileCheck -check-prefix=HELP %s
274274
HELP: USAGE:

0 commit comments

Comments
 (0)