https://github.com/amordo updated https://github.com/llvm/llvm-project/pull/89037
>From 3711ce61bf34bae7e9f4e614692978e0cd3e2d94 Mon Sep 17 00:00:00 2001 From: Alexander Mordovskiy <iammo...@gmail.com> Date: Wed, 24 Apr 2024 15:48:41 +0200 Subject: [PATCH] [lldb] check python extension debug suffix on Win ae389b2450bd604a3f3bbe5b09b333b2d99801dd 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). --- lldb/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index 7844d93d78d29a..b0764f1053277f 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -75,6 +75,14 @@ if (LLDB_ENABLE_PYTHON) endif() endif() endforeach() + # Make sure lldb extension has "_d" suffix on Windows in Debug mode. + if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL Debug) + string(SUBSTRING ${LLDB_PYTHON_EXT_SUFFIX} 0 2 FIRST_2_CHARS) + # Add "_d" manually if LLDB_PYTHON_EXT_SUFFIX lacks it due to release Python configuration. + if(NOT FIRST_2_CHARS STREQUAL "_d") + set(LLDB_PYTHON_EXT_SUFFIX "_d${LLDB_PYTHON_EXT_SUFFIX}") + endif() + endif() endif () if (LLDB_ENABLE_LUA) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits