From 4bb3b80b8f5ea83f29e5cd525c6b1ca2a589149e Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Mon, 13 Oct 2025 14:20:47 -0700 Subject: [PATCH] meson: avoid calling nm.full_path() when tool is not found If tool isn't found, we shouldn't call full_path() on it. This is the case for Android + meson2hermetic. Fixes: 2f652e0b3691e9 ("meson: move the generic symbols check arguments to a common variable") Cc: mesa-stable Reviewed-by: Eric Engestrom Part-of: --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 2a36a1b0038..1e07f92a72f 100644 --- a/meson.build +++ b/meson.build @@ -2316,7 +2316,9 @@ elif host_machine.system() == 'windows' and cc.get_argument_syntax() != 'msvc' else prog_nm = find_program('nm') with_symbols_check = prog_nm.found() and with_tests - symbols_check_args = ['--nm', prog_nm.full_path()] + if with_symbols_check + symbols_check_args = ['--nm', prog_nm.full_path()] + endif endif # This quirk needs to be applied to sources with functions defined in assembly