meson: replace has_exe_wrapper with can_run_host_binaries

The former is a deprecated alias for the latter, which more accurately
describes what the function does.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
This commit is contained in:
Dylan Baker
2022-12-21 09:30:44 -08:00
committed by Marge Bot
parent 45632b3297
commit 92235e0c48
4 changed files with 4 additions and 10 deletions

View File

@@ -543,7 +543,7 @@ endforeach
if not have_mtls_dialect
# need .run to check libc support. meson aborts when calling .run when
# cross-compiling, but because this is just an optimization we can skip it
if meson.is_cross_build() and not meson.has_exe_wrapper()
if meson.is_cross_build() and not meson.can_run_host_binaries()
warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
else
# -fpic to force dynamic tls, otherwise TLS relaxation defeats check

View File

@@ -80,10 +80,7 @@ glcpp = executable(
)
# Meson can't auto-skip these on cross builds because of the python wrapper
#
# TODO: has_exe_wrapper() is deprecated and renamed to can_run_host_binaries()
# starting with Meson 0.55.0
if with_any_opengl and with_tests and meson.has_exe_wrapper() and \
if with_any_opengl and with_tests and meson.can_run_host_binaries() and \
with_glcpp_tests
modes = ['unix', 'windows', 'oldmac', 'bizarro']

View File

@@ -66,10 +66,7 @@ test(
)
# Meson can't auto-skip these on cross builds because of the python wrapper
#
# TODO: has_exe_wrapper() is deprecated and renamed to can_run_host_binaries()
# starting with Meson 0.55.0
if meson.has_exe_wrapper()
if meson.can_run_host_binaries()
test(
'glsl compiler warnings',
prog_python,

View File

@@ -50,7 +50,7 @@ clang_test_code = '''
return found_pos == ::std::string::npos ? 1 : 0;
}
'''
can_check_clang = (not meson.is_cross_build() or meson.has_exe_wrapper()) and cpp.has_link_argument(linker_rpath_arg)
can_check_clang = (not meson.is_cross_build() or meson.can_run_host_binaries()) and cpp.has_link_argument(linker_rpath_arg)
if can_check_clang
test_run = cpp.run(clang_test_code, name : 'dep-clang-usable',
dependencies : [dep_llvm, dep_clang], args : linker_rpath_arg)