diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-17 12:37:09 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-09-24 12:14:13 -0700 |
commit | fa1398f86cafb300aae737cc737c97ec6b15c61c (patch) | |
tree | affec8da9c20f622395fe10dadc41d24c71ec726 | |
parent | 4911e8eef42b11612adfab517c2d31b453ed14c4 (diff) | |
download | meson-fa1398f86cafb300aae737cc737c97ec6b15c61c.zip meson-fa1398f86cafb300aae737cc737c97ec6b15c61c.tar.gz meson-fa1398f86cafb300aae737cc737c97ec6b15c61c.tar.bz2 |
compilers/mixins: make xc16 type safe
-rw-r--r-- | mesonbuild/compilers/mixins/xc16.py | 9 | ||||
-rwxr-xr-x | run_mypy.py | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/compilers/mixins/xc16.py b/mesonbuild/compilers/mixins/xc16.py index f12cccc..ed9be15 100644 --- a/mesonbuild/compilers/mixins/xc16.py +++ b/mesonbuild/compilers/mixins/xc16.py @@ -47,7 +47,12 @@ xc16_debug_args = { class Xc16Compiler: - def __init__(self): + + if T.TYPE_CHECKING: + can_compile_suffixes = set() # type: T.Set[str] + is_cross = True + + def __init__(self) -> None: if not self.is_cross: raise EnvironmentException('xc16 supports only cross-compilation.') self.id = 'xc16' @@ -85,7 +90,7 @@ class Xc16Compiler: def get_coverage_args(self) -> T.List[str]: return [] - + def get_no_stdinc_args(self) -> T.List[str]: return ['-nostdinc'] diff --git a/run_mypy.py b/run_mypy.py index 0e9d957..3faa230 100755 --- a/run_mypy.py +++ b/run_mypy.py @@ -28,6 +28,7 @@ modules = [ 'mesonbuild/compilers/mixins/islinker.py', 'mesonbuild/compilers/mixins/pgi.py', 'mesonbuild/compilers/mixins/visualstudio.py', + 'mesonbuild/compilers/mixins/xc16.py', # 'mesonbuild/coredata.py', 'mesonbuild/dependencies/boost.py', 'mesonbuild/dependencies/hdf5.py', |