From 8e564f16aea388834b69e784a82b248bae825c66 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 25 Mar 2025 02:23:42 +0100 Subject: compilers: introduce common helper for sanity checks Avoid reinventing the wheel and instead use a single helper, taking care of logging and cross compilation. Fixes: #14373 Signed-off-by: Paolo Bonzini --- mesonbuild/compilers/cs.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mesonbuild/compilers/cs.py') diff --git a/mesonbuild/compilers/cs.py b/mesonbuild/compilers/cs.py index 38bb338..4bbddeb 100644 --- a/mesonbuild/compilers/cs.py +++ b/mesonbuild/compilers/cs.py @@ -102,10 +102,7 @@ class CsCompiler(BasicLinkerIsCompilerMixin, Compiler): cmdlist = [self.runner, obj] else: cmdlist = [os.path.join(work_dir, obj)] - pe = subprocess.Popen(cmdlist, cwd=work_dir) - pe.wait() - if pe.returncode != 0: - raise EnvironmentException('Executables created by Mono compiler %s are not runnable.' % self.name_string()) + self.run_sanity_check(environment, cmdlist, work_dir, use_exe_wrapper_for_cross=False) def needs_static_linker(self) -> bool: return False -- cgit v1.1