Skip to content

Commit

Permalink
env2mfile: Automatically set exe_wrapper on Debian if possible
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
smcv committed Oct 2, 2024
1 parent 77b46ab commit 0b6a1cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mesonbuild/scripts/env2mfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,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:
Expand Down
1 change: 1 addition & 0 deletions unittests/internaltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,7 @@ def expected_binaries(gnu_tuple: str) -> T.Dict[str, T.List[str]]:
'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'],
Expand Down

0 comments on commit 0b6a1cd

Please sign in to comment.