[libc++] Reject abilist if it contains an ABI tag (#139030)

We currently don't have any ABI tags in our dylib symbols, and this is
unlikely to change in the future. By diagnosing this we avoid
accidentally adding one through e.g. having `_LIBCPP_HIDE_FROM_ABI` on
an exported symbol.
This commit is contained in:
Nikolas Klauser 2025-05-16 15:41:53 +02:00 committed by GitHub
parent 8eafd93034
commit e1ca2c5b60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,6 +80,11 @@ def main():
old_syms_list, _ = util.filter_stdlib_symbols(old_syms_list)
new_syms_list, _ = util.filter_stdlib_symbols(new_syms_list)
for symbol in new_syms_list:
if symbol["is_defined"] and 'B' in symbol["name"]:
print(f"Symbol {symbol['name']} contains an ABI tag!")
sys.exit(1)
added, removed, changed = diff.diff(old_syms_list, new_syms_list)
if args.removed_only:
added = {}