meson: only run symbols-check if nm is available

And drop the redundant check from symbols-check.py, which was actually
masking all kinds of issues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
This commit is contained in:
Eric Engestrom 2025-06-29 17:26:52 +02:00 committed by Marge Bot
parent f350803fb3
commit 4be493862d
2 changed files with 10 additions and 14 deletions

View file

@ -141,7 +141,6 @@ def main():
help='do not process this symbol')
args = parser.parse_args()
try:
if platform.system() == 'Windows':
if not args.dumpbin:
parser.error('--dumpbin is mandatory')
@ -150,10 +149,7 @@ def main():
if not args.nm:
parser.error('--nm is mandatory')
lib_symbols = get_symbols_nm(args.nm, args.lib)
except:
# We can't run this test, but we haven't technically failed it either
# Return the GNU "skip" error code
exit(77)
mandatory_symbols = []
optional_symbols = []
with open(args.symbols_file) as symbols_file:

View file

@ -2233,7 +2233,7 @@ if host_machine.system() == 'windows'
endif
else
prog_nm = find_program('nm')
with_symbols_check = with_tests
with_symbols_check = prog_nm.found() and with_tests
symbols_check_args = ['--nm', prog_nm.full_path()]
endif