[Lldb-commits] [lldb] e0adf63 - [lldb] fix python extension debug suffix on Win (#89037)

via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 24 08:04:34 PDT 2024


Author: Alexander M
Date: 2024-04-24T16:04:30+01:00
New Revision: e0adf63afc33a1e7fd4494c4f327d5ee4082b393

URL: https://github.com/llvm/llvm-project/commit/e0adf63afc33a1e7fd4494c4f327d5ee4082b393
DIFF: https://github.com/llvm/llvm-project/commit/e0adf63afc33a1e7fd4494c4f327d5ee4082b393.diff

LOG: [lldb] fix python extension debug suffix on Win (#89037)

ae389b2450bd604a3f3bbe5b09b333b2d99801dd change doesn't cover "_d"
suffix for Debug build on Windows.

Fixed #87381.

Added: 
    

Modified: 
    lldb/CMakeLists.txt

Removed: 
    


################################################################################
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)


        


More information about the lldb-commits mailing list