Don't pass --allow-shlib-undefined to lld if it's not supported

Fixes builds with llvm-mingw
pull/6648/head
Andrei Alexeyev 5 years ago committed by Dylan Baker
parent 8eb13c93ea
commit 49ae886620
  1. 13
      mesonbuild/linkers.py

@ -659,7 +659,18 @@ class LLVMDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, Dyna
This is only the posix-like linker.
"""
pass
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Some targets don't seem to support this argument (windows, wasm, ...)
_, _, e = mesonlib.Popen_safe(self.exelist + self._apply_prefix('--allow-shlib-undefined'))
self.has_allow_shlib_undefined = not ('unknown argument: --allow-shlib-undefined' in e)
def get_allow_undefined_args(self) -> typing.List[str]:
if self.has_allow_shlib_undefined:
return self._apply_prefix('--allow-shlib-undefined')
return []
class CcrxDynamicLinker(DynamicLinker):

Loading…
Cancel
Save