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/java.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mesonbuild/compilers/java.py') diff --git a/mesonbuild/compilers/java.py b/mesonbuild/compilers/java.py index 540e2aa..47d2ac9 100644 --- a/mesonbuild/compilers/java.py +++ b/mesonbuild/compilers/java.py @@ -91,10 +91,7 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler): runner = shutil.which(self.javarunner) if runner: cmdlist = [runner, '-cp', '.', obj] - pe = subprocess.Popen(cmdlist, cwd=work_dir) - pe.wait() - if pe.returncode != 0: - raise EnvironmentException(f'Executables created by Java compiler {self.name_string()} are not runnable.') + self.run_sanity_check(environment, cmdlist, work_dir, use_exe_wrapper_for_cross=False) else: m = "Java Virtual Machine wasn't found, but it's needed by Meson. " \ "Please install a JRE.\nIf you have specific needs where this " \ -- cgit v1.1