Skip to content

Commit e0adf63

Browse files
authored
[lldb] fix python extension debug suffix on Win (#89037)
ae389b2 change doesn't cover "_d" suffix for Debug build on Windows. Fixed #87381.
1 parent a61f9fe commit e0adf63

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lldb/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ if (LLDB_ENABLE_PYTHON)
7575
endif()
7676
endif()
7777
endforeach()
78+
# Make sure lldb extension has "_d" suffix on Windows in Debug mode.
79+
if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL Debug)
80+
string(SUBSTRING ${LLDB_PYTHON_EXT_SUFFIX} 0 2 FIRST_2_CHARS)
81+
# Add "_d" manually if LLDB_PYTHON_EXT_SUFFIX lacks it due to release Python configuration.
82+
if(NOT FIRST_2_CHARS STREQUAL "_d")
83+
set(LLDB_PYTHON_EXT_SUFFIX "_d${LLDB_PYTHON_EXT_SUFFIX}")
84+
endif()
85+
endif()
7886
endif ()
7987

8088
if (LLDB_ENABLE_LUA)

0 commit comments

Comments
 (0)