diff --git a/bin/symbols-check.py b/bin/symbols-check.py index 876807c0859..841860c65ad 100644 --- a/bin/symbols-check.py +++ b/bin/symbols-check.py @@ -141,19 +141,15 @@ 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') - lib_symbols = get_symbols_dumpbin(args.dumpbin, args.lib) - else: - 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) + if platform.system() == 'Windows': + if not args.dumpbin: + parser.error('--dumpbin is mandatory') + lib_symbols = get_symbols_dumpbin(args.dumpbin, args.lib) + else: + if not args.nm: + parser.error('--nm is mandatory') + lib_symbols = get_symbols_nm(args.nm, args.lib) + mandatory_symbols = [] optional_symbols = [] with open(args.symbols_file) as symbols_file: diff --git a/meson.build b/meson.build index 81da6a697b3..87f0be82049 100644 --- a/meson.build +++ b/meson.build @@ -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