From d885f0506a8691b8c532852e2181d32f15b6bcc7 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 (cherry picked from commit 4bb3b80b8f5ea83f29e5cd525c6b1ca2a589149e) Part-of: --- .pick_status.json | 2 +- meson.build | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c3a12b4d33d..efecaa278e4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -64,7 +64,7 @@ "description": "meson: avoid calling nm.full_path() when tool is not found", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "2f652e0b3691e94d6a81e37985741d35561b2312", "notes": null diff --git a/meson.build b/meson.build index 6f0b261b24f..9716180ee6d 100644 --- a/meson.build +++ b/meson.build @@ -2269,7 +2269,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