[check-symbols] Don't run c++filt

For adding to ignore list, we want to see the original symbol
name. One can always c++filt themselves.
This commit is contained in:
Behdad Esfahbod 2025-03-07 21:19:09 -07:00
parent 5c01d8298c
commit 77314a3be7

View file

@ -26,8 +26,6 @@ if not nm:
print ('check-symbols.py: \'nm\' not found; skipping test')
sys.exit (77)
cxxfilt = shutil.which ('c++filt')
tested = False
stat = 0
@ -43,12 +41,6 @@ for soname in ['harfbuzz', 'harfbuzz-subset', 'harfbuzz-icu', 'harfbuzz-gobject'
for s in re.findall (r'^.+ [BCDGIRSTu] .+$', subprocess.check_output (nm.split() + [so]).decode ('utf-8'), re.MULTILINE)
if not re.match (r'.* %s(%s)\b' % (symprefix, IGNORED_SYMBOLS), s)]
# run again c++filt also if is available
if cxxfilt:
EXPORTED_SYMBOLS = subprocess.check_output (
[cxxfilt], input='\n'.join (EXPORTED_SYMBOLS).encode ()
).decode ('utf-8').splitlines ()
prefix = (symprefix + os.path.basename (so)).replace ('libharfbuzz', 'hb').replace ('-', '_').split ('.')[0]
print ('Checking that %s does not expose internal symbols' % so)