diff options
| author | Simon McVittie <smcv@debian.org> | 2024-10-02 19:25:12 +0100 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-10-22 01:02:36 +0300 |
| commit | 86f9fe4c9a825feb93ca4b2ecf701d0877120d06 (patch) | |
| tree | 4aa13de9ec9ad8001cbb20985a6906282d4c6b07 | |
| parent | 851d866349b41533d57ef8a3c3e49f01f95680e3 (diff) | |
| download | meson-86f9fe4c9a825feb93ca4b2ecf701d0877120d06.tar.gz | |
env2mfile: Automatically set exe_wrapper on Debian if possible
Recent versions of the architecture-properties package provide a
cross-exe-wrapper package containing
${DEB_HOST_GNU_TYPE}-cross-exe-wrapper, which is currently a wrapper
around qemu-user but could use different emulators on each architecture
if it becomes necessary in the future.
Signed-off-by: Simon McVittie <smcv@debian.org>
| -rwxr-xr-x | mesonbuild/scripts/env2mfile.py | 7 | ||||
| -rw-r--r-- | unittests/internaltests.py | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/scripts/env2mfile.py b/mesonbuild/scripts/env2mfile.py index 2a366fd19..7896954fa 100755 --- a/mesonbuild/scripts/env2mfile.py +++ b/mesonbuild/scripts/env2mfile.py @@ -243,6 +243,13 @@ def dpkg_architecture_to_machine_info(output: str, options: T.Any) -> MachineInf infos.binaries[tool] = locate_path("%s-%s" % (host_arch, tool)) except ValueError: pass # optional + for tool, exe in [ + ('exe_wrapper', 'cross-exe-wrapper'), + ]: + try: + infos.binaries[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 0cf706001..0116f7fde 100644 --- a/unittests/internaltests.py +++ b/unittests/internaltests.py @@ -1750,6 +1750,7 @@ class InternalTests(unittest.TestCase): 'cmake': ['/usr/bin/cmake'], 'pkg-config': [f'/usr/bin/{gnu_tuple}-pkg-config'], 'cups-config': ['/usr/bin/cups-config'], + 'exe_wrapper': [f'/usr/bin/{gnu_tuple}-cross-exe-wrapper'], 'g-ir-annotation-tool': [f'/usr/bin/{gnu_tuple}-g-ir-annotation-tool'], 'g-ir-compiler': [f'/usr/bin/{gnu_tuple}-g-ir-compiler'], 'g-ir-doc-tool': [f'/usr/bin/{gnu_tuple}-g-ir-doc-tool'], |
