diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 5cfa06c27..3c58f3fda 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -64,7 +64,7 @@ class CCompiler(CLikeCompiler, Compiler): def sanity_check(self, work_dir, environment): code = 'int main(void) { int class=0; return class; }\n' - return self.sanity_check_impl(work_dir, environment, 'sanitycheckc.c', code) + return self._sanity_check_impl(work_dir, environment, 'sanitycheckc.c', code) def has_header_symbol(self, hname, symbol, prefix, env, *, extra_args=None, dependencies=None): fargs = {'prefix': prefix, 'header': hname, 'symbol': symbol} diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 698c71ae0..3a27e7a77 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -77,7 +77,7 @@ class CPPCompiler(CLikeCompiler, Compiler): def sanity_check(self, work_dir, environment): code = 'class breakCCompiler;int main(void) { return 0; }\n' - return self.sanity_check_impl(work_dir, environment, 'sanitycheckcpp.cc', code) + return self._sanity_check_impl(work_dir, environment, 'sanitycheckcpp.cc', code) def get_compiler_check_args(self): # -fpermissive allows non-conforming code to compile which is necessary diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 293d7f9e5..c92aac8de 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -325,7 +325,7 @@ class CLikeCompiler: def gen_import_library_args(self, implibname: str) -> T.List[str]: return self.linker.import_library_args(implibname) - def sanity_check_impl(self, work_dir: str, environment: 'Environment', + def _sanity_check_impl(self, work_dir: str, environment: 'Environment', sname: str, code: str) -> None: mlog.debug('Sanity testing ' + self.get_display_language() + ' compiler:', ' '.join(self.exelist)) mlog.debug('Is cross compiler: %s.' % str(self.is_cross)) @@ -383,7 +383,7 @@ class CLikeCompiler: def sanity_check(self, work_dir: str, environment: 'Environment') -> None: code = 'int main(void) { int class=0; return class; }\n' - return self.sanity_check_impl(work_dir, environment, 'sanitycheckc.c', code) + return self._sanity_check_impl(work_dir, environment, 'sanitycheckc.c', code) def check_header(self, hname: str, prefix: str, env: 'Environment', *, extra_args: T.Optional[T.List[str]] = None,