summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2024-10-02 19:27:00 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2024-10-22 01:02:36 +0300
commitf0a86b2b8c05c091e3fc03c2982affbd3ec7f59e (patch)
tree590722da89fa25e2361b815f4f351c878261e2c6
parent86f9fe4c9a825feb93ca4b2ecf701d0877120d06 (diff)
downloadmeson-f0a86b2b8c05c091e3fc03c2982affbd3ec7f59e.tar.gz
env2mfile: Use a cross valac on Debian if possible
This is functionally equivalent to the logic used to locate the cross exe_wrapper, but puts it below the "Compilers" heading rather than "Other binaries". Signed-off-by: Simon McVittie <smcv@debian.org>
-rwxr-xr-xmesonbuild/scripts/env2mfile.py7
-rw-r--r--unittests/internaltests.py1
2 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/scripts/env2mfile.py b/mesonbuild/scripts/env2mfile.py
index 7896954fa..05bd1544e 100755
--- a/mesonbuild/scripts/env2mfile.py
+++ b/mesonbuild/scripts/env2mfile.py
@@ -250,6 +250,13 @@ def dpkg_architecture_to_machine_info(output: str, options: T.Any) -> MachineInf
infos.binaries[tool] = locate_path("%s-%s" % (host_arch, exe))
except ValueError:
pass
+ for tool, exe in [
+ ('vala', 'valac'),
+ ]:
+ try:
+ infos.compilers[tool] = locate_path("%s-%s" % (host_arch, exe))
+ except ValueError:
+ pass
try:
infos.binaries['cups-config'] = locate_path("cups-config")
except ValueError:
diff --git a/unittests/internaltests.py b/unittests/internaltests.py
index 0116f7fde..69f52a413 100644
--- a/unittests/internaltests.py
+++ b/unittests/internaltests.py
@@ -1739,6 +1739,7 @@ class InternalTests(unittest.TestCase):
'cpp': [f'/usr/bin/{gnu_tuple}-g++{gcc_suffix}'],
'objc': [f'/usr/bin/{gnu_tuple}-gobjc{gcc_suffix}'],
'objcpp': [f'/usr/bin/{gnu_tuple}-gobjc++{gcc_suffix}'],
+ 'vala': [f'/usr/bin/{gnu_tuple}-valac'],
}
def expected_binaries(gnu_tuple: str) -> T.Dict[str, T.List[str]]: