[Lldb-commits] [lldb] [lldb] Support a Stable ABI LLDB_PYTHON_EXT_SUFFIX (PR #166269)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 5 02:21:16 PST 2025


================
@@ -68,7 +71,10 @@ def main():
                     print("sys.prefix:", sys.prefix, file=sys.stderr)
                     sys.exit(1)
     elif args.variable_name == "LLDB_PYTHON_EXT_SUFFIX":
-        print(sysconfig.get_config_var("EXT_SUFFIX"))
+        if args.stable_abi:
+            print(".abi3%s" % sysconfig.get_config_var("SHLIB_SUFFIX"))
----------------
DavidSpickett wrote:

I do see code using `EXTENSION_SUFFIXES` and checking for the entry that contains `.abi3`. It doesn't say it has a set order and in theory I could make my strange platform's shared object suffix start with `.abi3` and end up with `.cpython-311-x86_64-linux-letsbreakassumptions.abi3askingfortrouble` as one of the entries.

So yes, what you've done is fine.

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


More information about the lldb-commits mailing list