summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2025-04-16 16:50:46 -0400
committerEli Schwartz <eschwartz93@gmail.com>2025-04-16 17:00:04 -0400
commit944456b5f9b4428853f231368e2baea979042c46 (patch)
treec03357bbc4b0fb01d6b63f630e347c7a140fb8d4
parent84b7870caca35d063e35cf407ec804ff91d8f8c7 (diff)
downloadmeson-944456b5f9b4428853f231368e2baea979042c46.tar.gz
linkers: fix regression when using lld after iOS changes
``` $ LDFLAGS="-fuse-ld=lld" meson setup builddir/ [...] linker = lld_cls( compiler, for_machine, comp_class.LINKER_PREFIX, override, system=system, version=v) TypeError: LLVMDynamicLinker.__init__() got an unexpected keyword argument 'system' ``` Fixes regression in commit cece1a7e9992a3bbcc35f90777ba22ba9d62b538. We pass system=system to the linker construction, which worked fine for Apple LLVM LD64 as that inherited `__init__` from DynamicLinker. But non-Apple LLD had an overridden `__init__` which wasn't adapted. Even if it is thrown away and never used, since LLVM isn't an Apple linker, we still need to obey the argument contract.
-rw-r--r--mesonbuild/linkers/linkers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py
index 617d4ad3c..59f60e03a 100644
--- a/mesonbuild/linkers/linkers.py
+++ b/mesonbuild/linkers/linkers.py
@@ -945,8 +945,9 @@ class LLVMDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, Dyna
def __init__(self, exelist: T.List[str],
for_machine: mesonlib.MachineChoice, prefix_arg: T.Union[str, T.List[str]],
- always_args: T.List[str], *, version: str = 'unknown version'):
- super().__init__(exelist, for_machine, prefix_arg, always_args, version=version)
+ always_args: T.List[str], *, system: str = 'unknown system',
+ version: str = 'unknown version'):
+ super().__init__(exelist, for_machine, prefix_arg, always_args, system=system, version=version)
# Some targets don't seem to support this argument (windows, wasm, ...)
self.has_allow_shlib_undefined = self._supports_flag('--allow-shlib-undefined', always_args)