diff options
-rw-r--r-- | mesonbuild/environment.py | 13 | ||||
-rw-r--r-- | mesonbuild/linkers.py | 29 | ||||
-rwxr-xr-x | run_unittests.py | 4 |
3 files changed, 15 insertions, 31 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 4c07e58..f3f5e9e 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -53,8 +53,6 @@ from .linkers import ( PGIDynamicLinker, PGIStaticLinker, SolarisDynamicLinker, - XildAppleDynamicLinker, - XildLinuxDynamicLinker, XilinkDynamicLinker, CudaLinker, ) @@ -1046,9 +1044,9 @@ class Environment: if '(ICC)' in out: cls = IntelCCompiler if lang == 'c' else IntelCPPCompiler if self.machines[for_machine].is_darwin(): - l = XildAppleDynamicLinker(compiler, for_machine, 'xild', cls.LINKER_PREFIX, [], version=version) + l = AppleDynamicLinker(compiler, for_machine, 'APPLE ld', cls.LINKER_PREFIX, [], version=version) else: - l = XildLinuxDynamicLinker(compiler, for_machine, 'xild', cls.LINKER_PREFIX, [], version=version) + l = self._guess_nix_linker(compiler, cls, for_machine) return cls( ccache + compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=l) @@ -1176,8 +1174,7 @@ class Environment: info, exe_wrap, linker=linker) if 'ifort (IFORT)' in out: - linker = XildLinuxDynamicLinker( - compiler, for_machine, 'xild', IntelFortranCompiler.LINKER_PREFIX, [], version=version) + linker = self._guess_nix_linker(compiler, IntelFortranCompiler, for_machine) return IntelFortranCompiler( compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=linker) @@ -1376,8 +1373,10 @@ class Environment: # This trickery with type() gets us the class of the linker # so we can initialize a new copy for the Rust Compiler + linker = type(cc.linker)(compiler, for_machine, cc.linker.id, cc.LINKER_PREFIX, - always_args=extra_args, version=cc.linker.version) + always_args=extra_args, version=cc.linker.version, + **extra_args) return RustCompiler( compiler, version, for_machine, is_cross, info, exe_wrap, diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index 021134e..1c0dfff 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -399,6 +399,11 @@ class DynamicLinker(metaclass=abc.ABCMeta): install_rpath: str) -> typing.List[str]: return [] + def get_soname_args(self, env: 'Environment', prefix: str, shlib_name: str, + suffix: str, soversion: str, darwin_versions: typing.Tuple[str, str], + is_shared_module: bool) -> typing.List[str]: + return [] + class PosixDynamicLinkerMixin: @@ -423,8 +428,8 @@ class GnuLikeDynamicLinkerMixin: """Mixin class for dynamic linkers that provides gnu-like interface. - This acts as a base for the GNU linkers (bfd and gold), the Intel Xild - (which comes with ICC), LLVM's lld, and other linkers like GNU-ld. + This acts as a base for the GNU linkers (bfd and gold), LLVM's lld, and + other linkers like GNU-ld. """ _BUILDTYPE_ARGS = { @@ -660,26 +665,6 @@ class LLVMDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, Dyna pass -class XildLinuxDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, DynamicLinker): - - """Representation of Intel's Xild linker. - - This is only the linux-like linker which dispatches to Gnu ld. - """ - - pass - - -class XildAppleDynamicLinker(AppleDynamicLinker): - - """Representation of Intel's Xild linker. - - This is the apple linker, which dispatches to Apple's ld. - """ - - pass - - class CcrxDynamicLinker(DynamicLinker): """Linker for Renesis CCrx compiler.""" diff --git a/run_unittests.py b/run_unittests.py index 74e5803..bf91613 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2299,11 +2299,11 @@ class AllPlatformTests(BasePlatformTests): if isinstance(cc, intel): self.assertIsInstance(linker, ar) if is_osx(): - self.assertIsInstance(cc.linker, mesonbuild.linkers.XildAppleDynamicLinker) + self.assertIsInstance(cc.linker, mesonbuild.linkers.AppleDynamicLinker) elif is_windows(): self.assertIsInstance(cc.linker, mesonbuild.linkers.XilinkDynamicLinker) else: - self.assertIsInstance(cc.linker, mesonbuild.linkers.XildLinuxDynamicLinker) + self.assertIsInstance(cc.linker, mesonbuild.linkers.GnuDynamicLinker) if isinstance(cc, msvc): self.assertTrue(is_windows()) self.assertIsInstance(linker, lib) |