Fix --allow-shlib-undefined for LLVM versions > 9
@@ -846,7 +846,8 @@ class LLVMDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, Dyna
# 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 = 'unknown argument: --allow-shlib-undefined' not in e
+ # Versions < 9 do not have a quoted argument
+ self.has_allow_shlib_undefined = ('unknown argument: --allow-shlib-undefined' not in e) and ("unknown argument: '--allow-shlib-undefined'" not in e)
def get_allow_undefined_args(self) -> T.List[str]:
if self.has_allow_shlib_undefined:
