From d3a059b55fac4e9cc3c7c306b2e6a4cf5e424aad Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 22 Sep 2020 15:18:24 -0700 Subject: compilers/cuda: make type safe --- mesonbuild/compilers/compilers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mesonbuild/compilers/compilers.py') diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 0b52b8b..fbb3eae 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -863,6 +863,9 @@ class Compiler(metaclass=abc.ABCMeta): def thread_flags(self, env: 'Environment') -> T.List[str]: return [] + def thread_link_flags(self, env: 'Environment') -> T.List[str]: + return self.linker.thread_flags(env) + def openmp_flags(self) -> T.List[str]: raise EnvironmentException('Language %s does not support OpenMP flags.' % self.get_display_language()) @@ -954,6 +957,9 @@ class Compiler(metaclass=abc.ABCMeta): def bitcode_args(self) -> T.List[str]: return self.linker.bitcode_args() + def get_buildtype_args(self, buildtype: str) -> T.List[str]: + raise EnvironmentException('{} does not implement get_buildtype_args'.format(self.id)) + def get_buildtype_linker_args(self, buildtype: str) -> T.List[str]: return self.linker.get_buildtype_args(buildtype) @@ -1078,6 +1084,10 @@ class Compiler(metaclass=abc.ABCMeta): def get_depfile_suffix(self) -> str: raise EnvironmentError('{} does not implement get_depfile_suffix'.format(self.id)) + def get_no_stdinc_args(self) -> T.List[str]: + """Arguments to turn off default inclusion of standard libraries.""" + return [] + def get_args_from_envvars(lang: str, for_machine: MachineChoice, -- cgit v1.1