aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r--mesonbuild/linkers.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index dbd90b2..41b445e 100644
--- a/mesonbuild/linkers.py
+++ b/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):