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

via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 16 06:41:57 PDT 2025


Author: Nikolas Klauser
Date: 2025-05-16T15:41:53+02:00
New Revision: e1ca2c5b6098b1fbeca4be7886a128f36ec1ea94

URL: https://github.com/llvm/llvm-project/commit/e1ca2c5b6098b1fbeca4be7886a128f36ec1ea94
DIFF: https://github.com/llvm/llvm-project/commit/e1ca2c5b6098b1fbeca4be7886a128f36ec1ea94.diff

LOG: [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.

Added: 
    

Modified: 
    libcxx/utils/sym_diff.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/sym_
diff .py b/libcxx/utils/sym_
diff .py
index 8eaf8b7a57591..8d2ff14c65429 100755
--- a/libcxx/utils/sym_
diff .py
+++ b/libcxx/utils/sym_
diff .py
@@ -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 = {}


        


More information about the libcxx-commits mailing list