Skip to content

Commit

Permalink
env2mfile: Use a cross valac on Debian if possible
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
smcv committed Oct 2, 2024
1 parent 0b6a1cd commit 8db2d78
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 @@ -249,6 +249,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:
Expand Down
1 change: 1 addition & 0 deletions unittests/internaltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,7 @@ def expected_compilers(
'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]]:
Expand Down

0 comments on commit 8db2d78

Please sign in to comment.