aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cs.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-03-25 02:23:42 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2025-04-30 00:14:44 +0300
commit8e564f16aea388834b69e784a82b248bae825c66 (patch)
tree3da6f759e928e5265ba9bb563359c144b686572c /mesonbuild/compilers/cs.py
parent8909a09d2a8713c4fc0c31c2df6c9b022b840213 (diff)
downloadmeson-8e564f16aea388834b69e784a82b248bae825c66.zip
meson-8e564f16aea388834b69e784a82b248bae825c66.tar.gz
meson-8e564f16aea388834b69e784a82b248bae825c66.tar.bz2
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 <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/compilers/cs.py')
-rw-r--r--mesonbuild/compilers/cs.py5
1 files changed, 1 insertions, 4 deletions
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