Fix GNU-like LLD being misdetected as MSVC-like LLD

Affects the latest version of the llvm-mingw toolchain
pull/5969/head
Andrei Alexeyev 5 years ago committed by Dylan Baker
parent 7dbabdc7b6
commit 3fd460bce7
  1. 5
      mesonbuild/environment.py

@ -717,7 +717,10 @@ class Environment:
check_args = prefix + ['/logo'] + prefix + ['--version']
p, o, _ = Popen_safe(compiler + check_args)
if o.startswith('LLD'):
return ClangClDynamicLinker(for_machine, exelist=compiler, prefix=prefix, version=search_version(o))
if '(compatible with GNU linkers)' in o:
return LLVMDynamicLinker(compiler, for_machine, 'lld', prefix, version=search_version(o))
else:
return ClangClDynamicLinker(for_machine, exelist=compiler, prefix=prefix, version=search_version(o))
elif o.startswith('Microsoft'):
match = re.search(r'.*(X86|X64|ARM|ARM64).*', o)
if match:

Loading…
Cancel
Save