diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-14 23:35:57 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-10-18 14:43:42 -0700 |
commit | 492cc9bf95d573e037155b588dc5110ded4d9a35 (patch) | |
tree | 19ebcada3ac536a959a65639781a2f706d24977a | |
parent | 8945c53711c92f2fb48cfab94870e3cf759f3a35 (diff) | |
download | meson-492cc9bf95d573e037155b588dc5110ded4d9a35.zip meson-492cc9bf95d573e037155b588dc5110ded4d9a35.tar.gz meson-492cc9bf95d573e037155b588dc5110ded4d9a35.tar.bz2 |
linkers: detect LLD when built with PACKAGE_VENDOR
https://github.com/Homebrew/homebrew-core/commit/e7c972b6062af753e564104e58d1fa20c0d1ad7a
added PACKAGE_VENDOR to lld, causing the -v output to start with "Homebrew LLD"
rather than just "LLD". Meson no longer detects it and fails the
test_ld_environment_variable_lld unit test.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | mesonbuild/linkers/detect.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py index 183e4e8..f936e56 100644 --- a/mesonbuild/linkers/detect.py +++ b/mesonbuild/linkers/detect.py @@ -79,7 +79,7 @@ def guess_win_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty check_args.extend(extra_args) p, o, _ = Popen_safe(compiler + check_args) - if o.startswith('LLD'): + if 'LLD' in o.split('\n')[0]: if '(compatible with GNU linkers)' in o: return LLVMDynamicLinker( compiler, for_machine, comp_class.LINKER_PREFIX, @@ -94,7 +94,7 @@ def guess_win_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty # We've already hanedled the non-direct case above p, o, e = Popen_safe(compiler + check_args) - if o.startswith('LLD'): + if 'LLD' in o.split('\n')[0]: return ClangClDynamicLinker( for_machine, [], prefix=comp_class.LINKER_PREFIX if use_linker_prefix else [], @@ -151,7 +151,7 @@ def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty _, o, e = Popen_safe(compiler + check_args) v = search_version(o + e) linker: DynamicLinker - if o.startswith('LLD'): + if 'LLD' in o.split('\n')[0]: linker = LLVMDynamicLinker( compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) elif 'Snapdragon' in e and 'LLVM' in e: |