aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py11
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,