summaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-07-03 15:38:32 -0700
committerDylan Baker <dylan@pnwbakers.com>2025-10-06 09:03:07 -0700
commit806289a5d27958a084bc6cba41b7cf9ccee4ecf4 (patch)
treed6193d9aa67a6fb26e539d8b936f58aea19f2958 /mesonbuild/dependencies
parentbe50d0e23737dc0fc5f074a291644d7fde39ef7b (diff)
downloadmeson-806289a5d27958a084bc6cba41b7cf9ccee4ecf4.tar.gz
compilers: refactor sanity checking code
The goal is to reduce code duplication, and allow each language to implement as little as possible to get good checking. The main motivation is that half of the checks are fragile, as they add the work directory to the paths of the generated files they want to use. This works when run inside mesonmain because we always have an absolute build directory, but when put into run_project_tests.py it doesn't work because that gives a relative build directory.
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/base.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 72dbfdf2d..b746fa8e6 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -55,8 +55,11 @@ class MissingCompiler(_MissingCompilerBase):
def get_output_args(self, outputname: str) -> T.List[str]:
return []
- def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
- return None
+ def _sanity_check_compile_args(self, env: Environment, sourcename: str, binname: str) -> T.List[str]:
+ return []
+
+ def _sanity_check_source_code(self) -> str:
+ return ''
def __getattr__(self, item: str) -> T.Any:
if item.startswith('__'):