diff options
-rw-r--r-- | mesonbuild/compilers/compilers.py | 5 | ||||
-rw-r--r-- | mesonbuild/compilers/cuda.py | 5 | ||||
-rw-r--r-- | mesonbuild/compilers/d.py | 6 | ||||
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 3 |
4 files changed, 6 insertions, 13 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 6f15e48..0b52b8b 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1072,6 +1072,11 @@ class Compiler(metaclass=abc.ABCMeta): def get_include_args(self, path: str, is_system: bool) -> T.List[str]: return [] + def depfile_for_object(self, objfile: str) -> str: + return objfile + '.' + self.get_depfile_suffix() + + def get_depfile_suffix(self) -> str: + raise EnvironmentError('{} does not implement get_depfile_suffix'.format(self.id)) def get_args_from_envvars(lang: str, diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index e6b4d04..5fdf024 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -251,10 +251,7 @@ class CudaCompiler(Compiler): def get_link_debugfile_args(self, targetfile): return self._cook_link_args(self.host_compiler.get_link_debugfile_args(targetfile)) - def depfile_for_object(self, objfile): - return objfile + '.' + self.get_depfile_suffix() - - def get_depfile_suffix(self): + def get_depfile_suffix(self) -> str: return 'd' def get_buildtype_linker_args(self, buildtype): diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index 2be19f7..5f5f7d4 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -111,9 +111,6 @@ class DmdLikeCompilerMixin: def get_compile_only_args(self): return ['-c'] - def depfile_for_object(self, objfile): - return objfile + '.' + self.get_depfile_suffix() - def get_depfile_suffix(self): return 'deps' @@ -469,9 +466,6 @@ class DCompiler(Compiler): def needs_static_linker(self): return True - def depfile_for_object(self, objfile): - return objfile + '.' + self.get_depfile_suffix() - def get_depfile_suffix(self): return 'deps' diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 2802aaf..840dc30 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 depfile_for_object(self, objfile: str) -> str: - return objfile + '.' + self.get_depfile_suffix() - def get_depfile_suffix(self) -> str: return 'd' |