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: 2f652e0b36 ("meson: move the generic symbols check arguments to a common variable")
Cc: mesa-stable

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
This commit is contained in:
Gurchetan Singh 2025-10-13 14:20:47 -07:00 committed by Marge Bot
parent 4baae4c4d4
commit 4bb3b80b8f

View file

@ -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