aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-03-24 17:36:52 +0200
committerGitHub <noreply@github.com>2020-03-24 08:36:52 -0700
commitb3fe9fa5d86bf48649adf72333531f6e164ab381 (patch)
tree04367f3e2123ca86c1a521234e2567dbdee9dc62
parent253fbc4470cc19eeff320c6f5fa4718071075316 (diff)
downloadmeson-b3fe9fa5d86bf48649adf72333531f6e164ab381.zip
meson-b3fe9fa5d86bf48649adf72333531f6e164ab381.tar.gz
meson-b3fe9fa5d86bf48649adf72333531f6e164ab381.tar.bz2
Clarify a workaround for older versions of LLD for MinGW (#6836) [skip ci]
The previous diagnosis (that the wrapper that injects the -target option to clang caused the issues) doesn't seem right; the issue was that LLD's MinGW frontend (which is invoked when ld.lld is given a COFF argument to the -m option) didn't handle the --version argument before LLD 9.0.0.
-rw-r--r--mesonbuild/environment.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 61e4e5d..c8d960b 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -854,7 +854,9 @@ class Environment:
linker = LLVMDynamicLinker(
compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) # type: DynamicLinker
elif e.startswith('lld-link: '):
- # Toolchain wrapper got in the way; this happens with e.g. https://github.com/mstorsjo/llvm-mingw
+ # The LLD MinGW frontend didn't respond to --version before version 9.0.0,
+ # and produced an error message about failing to link (when no object
+ # files were specified), instead of printing the version number.
# Let's try to extract the linker invocation command to grab the version.
_, o, e = Popen_safe(compiler + check_args + ['-v'])