Skip to content

Commit 1a2ae41

Browse files
committed
[lldb] check python extension debug suffix on Win
ae389b2 relies on LLDB_PYTHON_EXT_SUFFIX of Python3_EXECUTABLE for naming the result lldb python lib. Debug python is used in Debug LLDB on Windows, so the result lib name requires "_d". LLDB_PYTHON_EXT_SUFFIX doesn't start with "_d" if Python3_EXECUTABLE wasn't set to Debug executable explicitly. Perhaps a better solution can be found after solving "debug python executable is not currently handled" issue (https://gitlab.kitware.com/cmake/cmake/-/issues/25874#note_1506658).
1 parent 673da8c commit 1a2ae41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ if (LLDB_ENABLE_PYTHON)
7575
endif()
7676
endif()
7777
endforeach()
78+
if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL Debug)
79+
string(SUBSTRING ${LLDB_PYTHON_EXT_SUFFIX} 0 2 FIRST_2_CHARS)
80+
if(NOT FIRST_2_CHARS STREQUAL "_d")
81+
set(LLDB_PYTHON_EXT_SUFFIX "_d${LLDB_PYTHON_EXT_SUFFIX}")
82+
endif()
83+
endif()
7884
endif ()
7985

8086
if (LLDB_ENABLE_LUA)

0 commit comments

Comments
 (0)