[all-commits] [llvm/llvm-project] 4bf77a: [lldb][windows] Fix Python library link for LLDB_E...

Charles Zablit via All-commits all-commits at lists.llvm.org
Fri Jun 5 12:36:01 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4bf77a4abbeec52d2b229d36f9ae01d09d2794b8
      https://github.com/llvm/llvm-project/commit/4bf77a4abbeec52d2b229d36f9ae01d09d2794b8
  Author: Charles Zablit <c_zablit at apple.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M lldb/bindings/python/CMakeLists.txt
    M lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
    M lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h

  Log Message:
  -----------
  [lldb][windows] Fix Python library link for LLDB_ENABLE_PYTHON_LIMITED_API (#201407)

When `LLDB_ENABLE_PYTHON_LIMITED_API` is `ON`, `liblldb` should link
against `python3.dll` (stable ABI) rather than the `python310.dll`.

Previously, two issues prevented this on Windows:

1. The `ScriptInterpreter` plugin explicitly linked
`${Python3_LIBRARIES}` regardless of whether the limited API was
enabled.

2. Python's `pyconfig.h` emits a `#pragma` to select the import library
at link time, choosing `python3.lib` or `python310.lib` depending on
whether `Py_LIMITED_API` is defined. However,
`LLDB_ENABLE_PYTHON_LIMITED_API` was only surfaced through Config.h,
which is not included early enough in the compilation chain to affect
pyconfig.h in all translation units.

This patch fixes both issues.

This is needed for https://github.com/llvm/llvm-project/pull/200533.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list