symbols-check: Fix symbol demangling for Windows

Only strip leading underscores if there's also a trailing @
Fixes shared-glapi symbol check for x64

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881>
This commit is contained in:
Jesse Natalie 2021-09-15 14:41:34 -07:00 committed by Marge Bot
parent ed794207b5
commit 29e3094d1e
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ def get_symbols_dumpbin(dumpbin, lib):
continue
symbol_name = fields[3]
# De-mangle symbols
if symbol_name[0] == '_':
if symbol_name[0] == '_' and '@' in symbol_name:
symbol_name = symbol_name[1:].split('@')[0]
symbols.append(symbol_name)
return symbols