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>
(cherry picked from commit 4be493862d)
This commit is contained in:
Eric Engestrom 2025-06-29 17:26:52 +02:00 committed by Eric Engestrom
parent a8b6bbc5a1
commit 2b8877baff
3 changed files with 11 additions and 15 deletions

View file

@ -7944,7 +7944,7 @@
"description": "meson: only run symbols-check if `nm` is available",
"nominated": false,
"nomination_type": 0,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -140,7 +140,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')
@ -149,10 +148,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

@ -2277,7 +2277,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