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

via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 7 23:27:09 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>

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.


---
Full diff: https://github.com/llvm/llvm-project/pull/139030.diff


1 Files Affected:

- (modified) libcxx/utils/sym_diff.py (+5) 


``````````diff
diff --git a/libcxx/utils/sym_diff.py b/libcxx/utils/sym_diff.py
index 8eaf8b7a57591..91af4a0bddaa7 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 '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 = {}

``````````

</details>


https://github.com/llvm/llvm-project/pull/139030


More information about the libcxx-commits mailing list