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

Alexander M. via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 17 01:39:39 PDT 2024


https://github.com/amordo created https://github.com/llvm/llvm-project/pull/89037

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

Fixed #87381.

>From f9aa0192bb43e15ceab107b2beb0d2d50f1f8150 Mon Sep 17 00:00:00 2001
From: Alexander Mordovskiy <iammorjj at gmail.com>
Date: Wed, 17 Apr 2024 10:35:50 +0200
Subject: [PATCH] [lldb] fix python extension debug suffix on Win

ae389b2450bd604a3f3bbe5b09b333b2d99801dd change doesn't cover "_d" suffix for Debug build on Windows.
---
 lldb/bindings/python/CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lldb/bindings/python/CMakeLists.txt b/lldb/bindings/python/CMakeLists.txt
index 73b1239495e22e..183cee9ea64a06 100644
--- a/lldb/bindings/python/CMakeLists.txt
+++ b/lldb/bindings/python/CMakeLists.txt
@@ -136,7 +136,11 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
   else()
     set(LIBLLDB_SYMLINK_DEST "${LLVM_SHLIB_OUTPUT_INTDIR}/liblldb${CMAKE_SHARED_LIBRARY_SUFFIX}")
   endif()
-  set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb${LLDB_PYTHON_EXT_SUFFIX}")
+  if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL Debug)
+    set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb_d${LLDB_PYTHON_EXT_SUFFIX}")
+  else()
+    set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb${LLDB_PYTHON_EXT_SUFFIX}")
+  endif()
   create_relative_symlink(${swig_target} ${LIBLLDB_SYMLINK_DEST}
                           ${lldb_python_target_dir} ${LIBLLDB_SYMLINK_OUTPUT_FILE})
 



More information about the lldb-commits mailing list