From 1513aa437dd397934eff176c81d742a78e54ddb9 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 22 Sep 2020 10:49:46 -0700 Subject: [PATCH] compilers: move split_shlib_to_parts to the base compiler Only the GnuLikeCompiler overrides this, and it's implemented multiple places --- mesonbuild/compilers/compilers.py | 3 +++ mesonbuild/compilers/cs.py | 3 --- mesonbuild/compilers/java.py | 3 --- mesonbuild/compilers/mixins/clike.py | 3 --- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 01c087a47..578f65446 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1059,6 +1059,9 @@ class Compiler(metaclass=abc.ABCMeta): is good enough here. """ + def split_shlib_to_parts(self, fname: str) -> T.Tuple[T.Optional[str], str]: + return None, fname + def get_args_from_envvars(lang: str, for_machine: MachineChoice, diff --git a/mesonbuild/compilers/cs.py b/mesonbuild/compilers/cs.py index b269aecf9..b8e673ea4 100644 --- a/mesonbuild/compilers/cs.py +++ b/mesonbuild/compilers/cs.py @@ -61,9 +61,6 @@ class CsCompiler(BasicLinkerIsCompilerMixin, Compiler): def get_werror_args(self): return ['-warnaserror'] - def split_shlib_to_parts(self, fname): - return None, fname - def get_dependency_gen_args(self, outtarget, outfile): return [] diff --git a/mesonbuild/compilers/java.py b/mesonbuild/compilers/java.py index 8405b431f..e353950ba 100644 --- a/mesonbuild/compilers/java.py +++ b/mesonbuild/compilers/java.py @@ -37,9 +37,6 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler): def get_werror_args(self): return ['-Werror'] - def split_shlib_to_parts(self, fname): - return None, fname - def get_dependency_gen_args(self, outtarget, outfile): return [] diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index e146f5f62..2802aafc4 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -169,9 +169,6 @@ class CLikeCompiler(Compiler): # Almost every compiler uses this for disabling warnings return ['-w'] - def split_shlib_to_parts(self, fname: str) -> T.Tuple[T.Optional[str], str]: - return None, fname - def depfile_for_object(self, objfile: str) -> str: return objfile + '.' + self.get_depfile_suffix()