summaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-11-21 09:50:36 +0100
committerDylan Baker <dylan@pnwbakers.com>2025-04-02 08:44:37 -0700
commit2c10d77c3c7b2b9ad3464ef37bc6eb01fb34deb0 (patch)
tree97ea5b2d1a35055aa4421d8f068d710a79b6e032 /mesonbuild/backend
parentdfefd838a846dd944d8a3f91200b6c54f0ffd198 (diff)
downloadmeson-2c10d77c3c7b2b9ad3464ef37bc6eb01fb34deb0.tar.gz
compilers: introduce get_exe() and get_exe_args()
This will be used by rustdoc tests because the Test objects takes a single string for the command and everything else goes in the args. But apart from this, the need to split the executable from the arguments is common so create new methods to do it. While at it, fix brokenness in the handling of the zig compiler, which is checking against "zig" but failing to detect e.g. "/usr/bin/zig". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index a960537a8..8a7887837 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -2078,9 +2078,8 @@ class Backend:
Some backends don't support custom compilers. This is a convenience
method to convert a Compiler to a Generator.
'''
- exelist = compiler.get_exelist()
- exe = programs.ExternalProgram(exelist[0])
- args = exelist[1:]
+ exe = programs.ExternalProgram(compiler.get_exe())
+ args = compiler.get_exe_args()
commands = self.compiler_to_generator_args(target, compiler)
generator = build.Generator(exe, args + commands.to_native(),
[output_templ], depfile='@PLAINNAME@.d',