diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-21 18:17:16 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-10-01 15:05:00 -0700 |
commit | fe97977b00e2b3c0fec9bc85aa0bf3e11559802a (patch) | |
tree | 578ddd7e5967e27ef89ae5605d3780ba828dd05b /mesonbuild/compilers/compilers.py | |
parent | 96a1ae6dfe9209d907803b9f2ecca29d2047a47f (diff) | |
download | meson-fe97977b00e2b3c0fec9bc85aa0bf3e11559802a.zip meson-fe97977b00e2b3c0fec9bc85aa0bf3e11559802a.tar.gz meson-fe97977b00e2b3c0fec9bc85aa0bf3e11559802a.tar.bz2 |
compilers/cpp: Add type annotations
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index ea5c2c5..01c087a 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1048,6 +1048,17 @@ class Compiler(metaclass=abc.ABCMeta): def name_string(self) -> str: return ' '.join(self.exelist) + @abc.abstractmethod + def sanity_check(self, work_dir: str, environment: 'Environment') -> None: + """Check that this compiler actually works. + + This should provide a simple compile/link test. Somthing as simple as: + ```python + main(): return 0 + ``` + is good enough here. + """ + def get_args_from_envvars(lang: str, for_machine: MachineChoice, |