aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-10-03 21:25:04 -0700
committerGitHub <noreply@github.com>2020-10-03 21:25:04 -0700
commit10b44584ff0b1f49ece260a48f89eb59c123616f (patch)
tree3bc4f127fe0ecfc81aed2d871820efa1aa133138 /mesonbuild/compilers/mixins
parent264939963f696cbf768b1d7c8011d72a8064323f (diff)
parent2fe400c350a49930c3fbe86602efa9e0950bb1cb (diff)
downloadmeson-10b44584ff0b1f49ece260a48f89eb59c123616f.zip
meson-10b44584ff0b1f49ece260a48f89eb59c123616f.tar.gz
meson-10b44584ff0b1f49ece260a48f89eb59c123616f.tar.bz2
Merge pull request #7795 from dcbaker/submit/full-compiler-annotations
Full annotations for the Compiler package
Diffstat (limited to 'mesonbuild/compilers/mixins')
-rw-r--r--mesonbuild/compilers/mixins/arm.py4
-rw-r--r--mesonbuild/compilers/mixins/c2000.py6
-rw-r--r--mesonbuild/compilers/mixins/ccrx.py6
-rw-r--r--mesonbuild/compilers/mixins/clang.py13
-rw-r--r--mesonbuild/compilers/mixins/clike.py101
-rw-r--r--mesonbuild/compilers/mixins/compcert.py6
-rw-r--r--mesonbuild/compilers/mixins/gnu.py2
-rw-r--r--mesonbuild/compilers/mixins/intel.py30
-rw-r--r--mesonbuild/compilers/mixins/islinker.py3
-rw-r--r--mesonbuild/compilers/mixins/pgi.py6
-rw-r--r--mesonbuild/compilers/mixins/visualstudio.py3
-rw-r--r--mesonbuild/compilers/mixins/xc16.py6
12 files changed, 56 insertions, 130 deletions
diff --git a/mesonbuild/compilers/mixins/arm.py b/mesonbuild/compilers/mixins/arm.py
index 25fb545..ee7d337 100644
--- a/mesonbuild/compilers/mixins/arm.py
+++ b/mesonbuild/compilers/mixins/arm.py
@@ -81,7 +81,7 @@ class ArmCompiler(Compiler):
self.warn_args = {'0': [],
'1': default_warn_args,
'2': default_warn_args + [],
- '3': default_warn_args + []}
+ '3': default_warn_args + []} # type: T.Dict[str, T.List[str]]
# Assembly
self.can_compile_suffixes.add('s')
@@ -96,7 +96,6 @@ class ArmCompiler(Compiler):
def get_always_args(self) -> T.List[str]:
return []
- # Override CCompiler.get_dependency_gen_args
def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
return ['--depend_target', outtarget, '--depend', outfile, '--depend_single_line']
@@ -171,7 +170,6 @@ class ArmclangCompiler(Compiler):
# so it might change semantics at any time.
return ['-include-pch', os.path.join(pch_dir, self.get_pch_name(header))]
- # Override CCompiler.get_dependency_gen_args
def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
return ['-MD', '-MT', outtarget, '-MF', outfile]
diff --git a/mesonbuild/compilers/mixins/c2000.py b/mesonbuild/compilers/mixins/c2000.py
index aca1ee8..287aaa8 100644
--- a/mesonbuild/compilers/mixins/c2000.py
+++ b/mesonbuild/compilers/mixins/c2000.py
@@ -65,7 +65,7 @@ class C2000Compiler(Compiler):
self.warn_args = {'0': [],
'1': default_warn_args,
'2': default_warn_args + [],
- '3': default_warn_args + []}
+ '3': default_warn_args + []} # type: T.Dict[str, T.List[str]]
def get_pic_args(self) -> T.List[str]:
# PIC support is not enabled by default for c2000,
@@ -81,10 +81,6 @@ class C2000Compiler(Compiler):
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
return []
- # Override CCompiler.get_dependency_gen_args
- def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
- return []
-
def thread_flags(self, env: 'Environment') -> T.List[str]:
return []
diff --git a/mesonbuild/compilers/mixins/ccrx.py b/mesonbuild/compilers/mixins/ccrx.py
index fb82797..eba4c45 100644
--- a/mesonbuild/compilers/mixins/ccrx.py
+++ b/mesonbuild/compilers/mixins/ccrx.py
@@ -69,7 +69,7 @@ class CcrxCompiler(Compiler):
self.warn_args = {'0': [],
'1': default_warn_args,
'2': default_warn_args + [],
- '3': default_warn_args + []}
+ '3': default_warn_args + []} # type: T.Dict[str, T.List[str]]
def get_pic_args(self) -> T.List[str]:
# PIC support is not enabled by default for CCRX,
@@ -85,10 +85,6 @@ class CcrxCompiler(Compiler):
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
return []
- # Override CCompiler.get_dependency_gen_args
- def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
- return []
-
def thread_flags(self, env: 'Environment') -> T.List[str]:
return []
diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py
index 8c85944..acdb352 100644
--- a/mesonbuild/compilers/mixins/clang.py
+++ b/mesonbuild/compilers/mixins/clang.py
@@ -20,6 +20,7 @@ import typing as T
from ... import mesonlib
from ...linkers import AppleDynamicLinker
+from ..compilers import CompileCheckMode
from .gnu import GnuLikeCompiler
if T.TYPE_CHECKING:
@@ -76,11 +77,13 @@ class ClangCompiler(GnuLikeCompiler):
# so it might change semantics at any time.
return ['-include-pch', os.path.join(pch_dir, self.get_pch_name(header))]
- def has_multi_arguments(self, args: T.List[str], env: 'Environment') -> T.Tuple[bool, bool]:
- myargs = ['-Werror=unknown-warning-option', '-Werror=unused-command-line-argument']
- if mesonlib.version_compare(self.version, '>=3.6.0'):
- myargs.append('-Werror=ignored-optimization-argument')
- return super().has_multi_arguments(myargs + args, env)
+ def get_compiler_check_args(self, mode: CompileCheckMode) -> T.List[str]:
+ myargs = [] # type: T.List[str]
+ if mode is CompileCheckMode.COMPILE:
+ myargs.extend(['-Werror=unknown-warning-option', '-Werror=unused-command-line-argument'])
+ if mesonlib.version_compare(self.version, '>=3.6.0'):
+ myargs.append('-Werror=ignored-optimization-argument')
+ return super().get_compiler_check_args(mode) + myargs
def has_function(self, funcname: str, prefix: str, env: 'Environment', *,
extra_args: T.Optional[T.List[str]] = None,
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index e146f5f..dca09ea 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -20,7 +20,6 @@ of this is to have mixin's, which are classes that are designed *not* to be
standalone, they only work through inheritance.
"""
-import contextlib
import collections
import functools
import glob
@@ -37,6 +36,7 @@ from ... import mlog
from ...linkers import GnuLikeDynamicLinkerMixin, SolarisDynamicLinker, CompCertDynamicLinker
from ...mesonlib import LibType
from .. import compilers
+from ..compilers import CompileCheckMode
from .visualstudio import VisualStudioLikeCompiler
if T.TYPE_CHECKING:
@@ -140,7 +140,7 @@ class CLikeCompiler(Compiler):
if not exe_wrapper or not exe_wrapper.found() or not exe_wrapper.get_command():
self.exe_wrapper = None
else:
- self.exe_wrapper = exe_wrapper.get_command()
+ self.exe_wrapper = exe_wrapper
def compiler_args(self, args: T.Optional[T.Iterable[str]] = None) -> CLikeCompilerArgs:
# This is correct, mypy just doesn't understand co-operative inheritance
@@ -169,12 +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()
-
def get_depfile_suffix(self) -> str:
return 'd'
@@ -190,23 +184,12 @@ class CLikeCompiler(Compiler):
def get_no_optimization_args(self) -> T.List[str]:
return ['-O0']
- def get_compiler_check_args(self) -> T.List[str]:
- '''
- Get arguments useful for compiler checks such as being permissive in
- the code quality and not doing any optimization.
- '''
- return self.get_no_optimization_args()
-
def get_output_args(self, target: str) -> T.List[str]:
return ['-o', target]
def get_werror_args(self) -> T.List[str]:
return ['-Werror']
- def get_std_exe_link_args(self) -> T.List[str]:
- # TODO: is this a linker property?
- return []
-
def get_include_args(self, path: str, is_system: bool) -> T.List[str]:
if path == '':
path = '.'
@@ -306,7 +289,7 @@ class CLikeCompiler(Compiler):
source_name = os.path.join(work_dir, sname)
binname = sname.rsplit('.', 1)[0]
- mode = 'link'
+ mode = CompileCheckMode.LINK
if self.is_cross:
binname += '_cross'
if self.exe_wrapper is None:
@@ -315,7 +298,7 @@ class CLikeCompiler(Compiler):
# on OSX the compiler binary is the same but you need
# a ton of compiler flags to differentiate between
# arm and x86_64. So just compile.
- mode = 'compile'
+ mode = CompileCheckMode.COMPILE
cargs, largs = self._get_basic_compiler_args(environment, mode)
extra_flags = cargs + self.linker_to_compiler_args(largs)
@@ -343,7 +326,7 @@ class CLikeCompiler(Compiler):
if self.exe_wrapper is None:
# Can't check if the binaries run so we have to assume they do
return
- cmdlist = self.exe_wrapper + [binary_name]
+ cmdlist = self.exe_wrapper.get_command() + [binary_name]
else:
cmdlist = [binary_name]
mlog.debug('Running test binary command: ' + ' '.join(cmdlist))
@@ -401,10 +384,10 @@ class CLikeCompiler(Compiler):
return self.compiles(t.format(**fargs), env, extra_args=extra_args,
dependencies=dependencies)
- def _get_basic_compiler_args(self, env: 'Environment', mode: str) -> T.Tuple[T.List[str], T.List[str]]:
+ def _get_basic_compiler_args(self, env: 'Environment', mode: CompileCheckMode) -> T.Tuple[T.List[str], T.List[str]]:
cargs = [] # type: T.List[str]
largs = [] # type: T.List[str]
- if mode == 'link':
+ if mode is CompileCheckMode.LINK:
# Sometimes we need to manually select the CRT to use with MSVC.
# One example is when trying to do a compiler check that involves
# linking with static libraries since MSVC won't select a CRT for
@@ -425,7 +408,7 @@ class CLikeCompiler(Compiler):
cleaned_sys_args = self.remove_linkerlike_args(sys_args)
cargs += cleaned_sys_args
- if mode == 'link':
+ if mode is CompileCheckMode.LINK:
ld_value = env.lookup_binary_entry(self.for_machine, self.language + '_ld')
if ld_value is not None:
largs += self.use_linker_args(ld_value[0])
@@ -439,17 +422,17 @@ class CLikeCompiler(Compiler):
cargs += self.get_compiler_args_for_mode(mode)
return cargs, largs
- def _get_compiler_check_args(self, env: 'Environment',
- extra_args: T.Union[None, arglist.CompilerArgs, T.List[str]],
- dependencies: T.Optional[T.List['Dependency']],
- mode: str = 'compile') -> arglist.CompilerArgs:
+ def build_wrapper_args(self, env: 'Environment',
+ extra_args: T.Union[None, arglist.CompilerArgs, T.List[str]],
+ dependencies: T.Optional[T.List['Dependency']],
+ mode: CompileCheckMode = CompileCheckMode.COMPILE) -> arglist.CompilerArgs:
# TODO: the caller should handle the listfing of these arguments
if extra_args is None:
extra_args = []
else:
# TODO: we want to do this in the caller
extra_args = mesonlib.listify(extra_args)
- extra_args = mesonlib.listify([e(mode) if callable(e) else e for e in extra_args])
+ extra_args = mesonlib.listify([e(mode.value) if callable(e) else e for e in extra_args])
if dependencies is None:
dependencies = []
@@ -462,7 +445,7 @@ class CLikeCompiler(Compiler):
for d in dependencies:
# Add compile flags needed by dependencies
cargs += d.get_compile_args()
- if mode == 'link':
+ if mode is CompileCheckMode.LINK:
# Add link flags needed to find dependencies
largs += d.get_link_args()
@@ -470,7 +453,7 @@ class CLikeCompiler(Compiler):
cargs += ca
largs += la
- cargs += self.get_compiler_check_args()
+ cargs += self.get_compiler_check_args(mode)
# on MSVC compiler and linker flags must be separated by the "/link" argument
# at this point, the '/link' argument may already be part of extra_args, otherwise, it is added here
@@ -480,37 +463,6 @@ class CLikeCompiler(Compiler):
args = cargs + extra_args + largs
return args
- def compiles(self, code: str, env: 'Environment', *,
- extra_args: T.Union[None, T.List[str], arglist.CompilerArgs] = None,
- dependencies: T.Optional[T.List['Dependency']] = None,
- mode: str = 'compile',
- disable_cache: bool = False) -> T.Tuple[bool, bool]:
- with self._build_wrapper(code, env, extra_args, dependencies, mode, disable_cache=disable_cache) as p:
- return p.returncode == 0, p.cached
-
- @contextlib.contextmanager
- def _build_wrapper(self, code: str, env: 'Environment',
- extra_args: T.Union[None, arglist.CompilerArgs, T.List[str]] = None,
- dependencies: T.Optional[T.List['Dependency']] = None,
- mode: str = 'compile', want_output: bool = False,
- disable_cache: bool = False,
- temp_dir: str = None) -> T.Iterator[T.Optional[compilers.CompileResult]]:
- args = self._get_compiler_check_args(env, extra_args, dependencies, mode)
- if disable_cache or want_output:
- with self.compile(code, extra_args=args, mode=mode, want_output=want_output, temp_dir=env.scratch_dir) as r:
- yield r
- else:
- with self.cached_compile(code, env.coredata, extra_args=args, mode=mode, temp_dir=env.scratch_dir) as r:
- yield r
-
- def links(self, code: str, env: 'Environment', *,
- extra_args: T.Union[None, T.List[str], arglist.CompilerArgs] = None,
- dependencies: T.Optional[T.List['Dependency']] = None,
- mode: str = 'compile',
- disable_cache: bool = False) -> T.Tuple[bool, bool]:
- return self.compiles(code, env, extra_args=extra_args,
- dependencies=dependencies, mode='link', disable_cache=disable_cache)
-
def run(self, code: str, env: 'Environment', *,
extra_args: T.Optional[T.List[str]] = None,
dependencies: T.Optional[T.List['Dependency']] = None) -> compilers.RunResult:
@@ -524,7 +476,7 @@ class CLikeCompiler(Compiler):
p.returncode))
return compilers.RunResult(False)
if need_exe_wrapper:
- cmdlist = self.exe_wrapper + [p.output_name]
+ cmdlist = self.exe_wrapper.get_command() + [p.output_name]
else:
cmdlist = [p.output_name]
try:
@@ -729,8 +681,8 @@ class CLikeCompiler(Compiler):
# define {define}
#endif
{delim}\n{define}'''
- args = self._get_compiler_check_args(env, extra_args, dependencies,
- mode='preprocess').to_native()
+ args = self.build_wrapper_args(env, extra_args, dependencies,
+ mode=CompileCheckMode.PREPROCESS).to_native()
func = functools.partial(self.cached_compile, code.format(**fargs), env.coredata, extra_args=args, mode='preprocess')
if disable_cache:
func = functools.partial(self.compile, code.format(**fargs), extra_args=args, mode='preprocess', temp_dir=env.scratch_dir)
@@ -976,7 +928,7 @@ class CLikeCompiler(Compiler):
}
#endif
'''
- args = self.get_compiler_check_args()
+ args = self.get_compiler_check_args(CompileCheckMode.COMPILE)
n = 'symbols_have_underscore_prefix'
with self._build_wrapper(code, env, extra_args=args, mode='compile', want_output=True, temp_dir=env.scratch_dir) as p:
if p.returncode != 0:
@@ -1263,9 +1215,6 @@ class CLikeCompiler(Compiler):
return []
return ['-pthread']
- def thread_link_flags(self, env: 'Environment') -> T.List[str]:
- return self.linker.thread_flags(env)
-
def linker_to_compiler_args(self, args: T.List[str]) -> T.List[str]:
return args.copy()
@@ -1273,7 +1222,7 @@ class CLikeCompiler(Compiler):
mode: str) -> T.Tuple[bool, bool]:
return self.compiles(code, env, extra_args=args, mode=mode)
- def has_multi_arguments(self, args: T.List[str], env: 'Environment') -> T.Tuple[bool, bool]:
+ def _has_multi_arguments(self, args: T.List[str], env: 'Environment', code: str) -> T.Tuple[bool, bool]:
new_args = [] # type: T.List[str]
for arg in args:
# some compilers, e.g. GCC, don't warn for unsupported warning-disable
@@ -1291,18 +1240,22 @@ class CLikeCompiler(Compiler):
'other similar method can be used instead.'
.format(arg))
new_args.append(arg)
- code = 'extern int i;\nint i;\n'
return self.has_arguments(new_args, env, code, mode='compile')
- def has_multi_link_arguments(self, args: T.List[str], env: 'Environment') -> T.Tuple[bool, bool]:
+ def has_multi_arguments(self, args: T.List[str], env: 'Environment') -> T.Tuple[bool, bool]:
+ return self._has_multi_arguments(args, env, 'extern int i;\nint i;\n')
+
+ def _has_multi_link_arguments(self, args: T.List[str], env: 'Environment', code: str) -> T.Tuple[bool, bool]:
# First time we check for link flags we need to first check if we have
# --fatal-warnings, otherwise some linker checks could give some
# false positive.
args = self.linker.fatal_warnings() + args
args = self.linker_to_compiler_args(args)
- code = 'int main(void) { return 0; }\n'
return self.has_arguments(args, env, code, mode='link')
+ def has_multi_link_arguments(self, args: T.List[str], env: 'Environment') -> T.Tuple[bool, bool]:
+ return self._has_multi_link_arguments(args, env, 'int main(void) { return 0; }\n')
+
@staticmethod
def _concatenate_string_literals(s: str) -> str:
pattern = re.compile(r'(?P<pre>.*([^\\]")|^")(?P<str1>([^\\"]|\\.)*)"\s+"(?P<str2>([^\\"]|\\.)*)(?P<post>".*)')
diff --git a/mesonbuild/compilers/mixins/compcert.py b/mesonbuild/compilers/mixins/compcert.py
index 0f816a8..3211f6a 100644
--- a/mesonbuild/compilers/mixins/compcert.py
+++ b/mesonbuild/compilers/mixins/compcert.py
@@ -68,7 +68,7 @@ class CompCertCompiler(Compiler):
self.warn_args = {'0': [],
'1': default_warn_args,
'2': default_warn_args + [],
- '3': default_warn_args + []}
+ '3': default_warn_args + []} # type: T.Dict[str, T.List[str]]
def get_always_args(self) -> T.List[str]:
return []
@@ -99,10 +99,6 @@ class CompCertCompiler(Compiler):
patched_args.append(arg)
return patched_args
- # Override CCompiler.get_dependency_gen_args
- def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
- return []
-
def thread_flags(self, env: 'Environment') -> T.List[str]:
return []
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py
index 9c60fcb..41afadd 100644
--- a/mesonbuild/compilers/mixins/gnu.py
+++ b/mesonbuild/compilers/mixins/gnu.py
@@ -27,7 +27,7 @@ from ... import mlog
if T.TYPE_CHECKING:
from ...environment import Environment
- from .clike import CLikeCompiler as Compiler
+ from ..compilers import Compiler
else:
# This is a bit clever, for mypy we pretend that these mixins descend from
# Compiler, so we get all of the methods and attributes defined for us, but
diff --git a/mesonbuild/compilers/mixins/intel.py b/mesonbuild/compilers/mixins/intel.py
index 5bb55ff..442e8c7 100644
--- a/mesonbuild/compilers/mixins/intel.py
+++ b/mesonbuild/compilers/mixins/intel.py
@@ -24,6 +24,7 @@ import os
import typing as T
from ... import mesonlib
+from ..compilers import CompileCheckMode
from .gnu import GnuLikeCompiler
from .visualstudio import VisualStudioLikeCompiler
@@ -99,13 +100,8 @@ class IntelGnuLikeCompiler(GnuLikeCompiler):
else:
return ['-openmp']
- def compiles(self, code: str, env: 'Environment', *,
- extra_args: T.Union[None, T.List[str], 'CompilerArgs'] = None,
- dependencies: T.Optional[T.List['Dependency']] = None,
- mode: str = 'compile',
- disable_cache: bool = False) -> T.Tuple[bool, bool]:
- extra_args = extra_args.copy() if extra_args is not None else []
- extra_args += [
+ def get_compiler_check_args(self, mode: CompileCheckMode) -> T.List[str]:
+ extra_args = [
'-diag-error', '10006', # ignoring unknown option
'-diag-error', '10148', # Option not supported
'-diag-error', '10155', # ignoring argument required
@@ -113,7 +109,7 @@ class IntelGnuLikeCompiler(GnuLikeCompiler):
'-diag-error', '10157', # Ignoring argument of the wrong type
'-diag-error', '10158', # Argument must be separate. Can be hit by trying an option like -foo-bar=foo when -foo=bar is a valid option but -foo-bar isn't
]
- return super().compiles(code, env, extra_args=extra_args, dependencies=dependencies, mode=mode, disable_cache=disable_cache)
+ return super().get_compiler_check_args(mode) + extra_args
def get_profile_generate_args(self) -> T.List[str]:
return ['-prof-gen=threadsafe']
@@ -157,15 +153,10 @@ class IntelVisualStudioLikeCompiler(VisualStudioLikeCompiler):
super().__init__(target)
self.id = 'intel-cl'
- def compiles(self, code: str, env: 'Environment', *,
- extra_args: T.Union[None, T.List[str], 'CompilerArgs'] = None,
- dependencies: T.Optional[T.List['Dependency']] = None,
- mode: str = 'compile',
- disable_cache: bool = False) -> T.Tuple[bool, bool]:
- # This covers a case that .get('foo', []) doesn't, that extra_args is
- if mode != 'link':
- extra_args = extra_args.copy() if extra_args is not None else []
- extra_args.extend([
+ def get_compiler_check_args(self, mode: CompileCheckMode) -> T.List[str]:
+ args = super().get_compiler_check_args(mode)
+ if mode is not CompileCheckMode.LINK:
+ args.extend([
'/Qdiag-error:10006', # ignoring unknown option
'/Qdiag-error:10148', # Option not supported
'/Qdiag-error:10155', # ignoring argument required
@@ -173,7 +164,7 @@ class IntelVisualStudioLikeCompiler(VisualStudioLikeCompiler):
'/Qdiag-error:10157', # Ignoring argument of the wrong type
'/Qdiag-error:10158', # Argument must be separate. Can be hit by trying an option like -foo-bar=foo when -foo=bar is a valid option but -foo-bar isn't
])
- return super().compiles(code, env, extra_args=extra_args, dependencies=dependencies, mode=mode, disable_cache=disable_cache)
+ return args
def get_toolset_version(self) -> T.Optional[str]:
# Avoid circular dependencies....
@@ -195,3 +186,6 @@ class IntelVisualStudioLikeCompiler(VisualStudioLikeCompiler):
def get_optimization_args(self, optimization_level: str) -> T.List[str]:
return self.OPTIM_ARGS[optimization_level]
+
+ def get_pch_base_name(self, header: str) -> str:
+ return os.path.basename(header) \ No newline at end of file
diff --git a/mesonbuild/compilers/mixins/islinker.py b/mesonbuild/compilers/mixins/islinker.py
index ce7a8af..2445eec 100644
--- a/mesonbuild/compilers/mixins/islinker.py
+++ b/mesonbuild/compilers/mixins/islinker.py
@@ -97,8 +97,7 @@ class BasicLinkerIsCompilerMixin(Compiler):
return []
def get_coverage_link_args(self) -> T.List[str]:
- m = "Linker {} doesn't implement coverage data generation.".format(self.id)
- raise mesonlib.EnvironmentException(m)
+ return []
def no_undefined_link_args(self) -> T.List[str]:
return []
diff --git a/mesonbuild/compilers/mixins/pgi.py b/mesonbuild/compilers/mixins/pgi.py
index f6ad279..61dee8d 100644
--- a/mesonbuild/compilers/mixins/pgi.py
+++ b/mesonbuild/compilers/mixins/pgi.py
@@ -50,7 +50,8 @@ class PGICompiler(Compiler):
self.warn_args = {'0': [],
'1': default_warn_args,
'2': default_warn_args,
- '3': default_warn_args}
+ '3': default_warn_args
+ } # type: T.Dict[str, T.List[str]]
def get_module_incdir_args(self) -> T.Tuple[str]:
return ('-module', )
@@ -85,9 +86,6 @@ class PGICompiler(Compiler):
parameter_list[idx] = i[:2] + os.path.normpath(os.path.join(build_dir, i[2:]))
return parameter_list
- def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
- return []
-
def get_always_args(self) -> T.List[str]:
return []
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py
index 77f8dfc..3494bee 100644
--- a/mesonbuild/compilers/mixins/visualstudio.py
+++ b/mesonbuild/compilers/mixins/visualstudio.py
@@ -194,9 +194,6 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta):
args = [arg for arg in args if arg != '/Gw']
return args
- def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
- return []
-
def linker_to_compiler_args(self, args: T.List[str]) -> T.List[str]:
return ['/link'] + args
diff --git a/mesonbuild/compilers/mixins/xc16.py b/mesonbuild/compilers/mixins/xc16.py
index edc5f2c..77c4690 100644
--- a/mesonbuild/compilers/mixins/xc16.py
+++ b/mesonbuild/compilers/mixins/xc16.py
@@ -65,7 +65,7 @@ class Xc16Compiler(Compiler):
self.warn_args = {'0': [],
'1': default_warn_args,
'2': default_warn_args + [],
- '3': default_warn_args + []}
+ '3': default_warn_args + []} # type: T.Dict[str, T.List[str]]
def get_always_args(self) -> T.List[str]:
return []
@@ -84,10 +84,6 @@ class Xc16Compiler(Compiler):
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
return []
- # Override CCompiler.get_dependency_gen_args
- def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
- return []
-
def thread_flags(self, env: 'Environment') -> T.List[str]:
return []