[Lldb-commits] [lldb] 79e8f29 - [lldb/lua] Fix Lua building on Windows (#83871)

via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 4 11:54:28 PST 2024


Author: Alexander M
Date: 2024-03-04T11:54:24-08:00
New Revision: 79e8f29ab06560d159389d940c35c563e0c8640e

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

LOG: [lldb/lua] Fix Lua building on Windows (#83871)

Add `liblldb` dependency and use correct extension for compiled Lua
module.

Replace 'Python' with 'Lua' in install path name.

Fixes #55075.

Added: 
    

Modified: 
    lldb/bindings/lua/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/bindings/lua/CMakeLists.txt b/lldb/bindings/lua/CMakeLists.txt
index 1a739a9805ec8a..2d128cc1864c87 100644
--- a/lldb/bindings/lua/CMakeLists.txt
+++ b/lldb/bindings/lua/CMakeLists.txt
@@ -28,7 +28,7 @@ endfunction()
 function(finish_swig_lua swig_target lldb_lua_bindings_dir lldb_lua_target_dir)
   add_custom_target(${swig_target} ALL VERBATIM
     COMMAND ${CMAKE_COMMAND} -E make_directory ${lldb_lua_target_dir}
-    DEPENDS swig_wrapper_lua
+    DEPENDS swig_wrapper_lua liblldb
     COMMENT "LLDB Lua API")
   if(LLDB_BUILD_FRAMEWORK)
     set(LIBLLDB_SYMLINK_DEST "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/LLDB")
@@ -36,11 +36,7 @@ function(finish_swig_lua swig_target lldb_lua_bindings_dir lldb_lua_target_dir)
     set(LIBLLDB_SYMLINK_DEST "${LLVM_SHLIB_OUTPUT_INTDIR}/liblldb${CMAKE_SHARED_LIBRARY_SUFFIX}")
   endif()
   if(WIN32)
-    if(CMAKE_BUILD_TYPE STREQUAL Debug)
-      set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb_d.pyd")
-    else()
-      set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb.pyd")
-    endif()
+    set(LIBLLDB_SYMLINK_OUTPUT_FILE "lldb.dll")
   else()
     set(LIBLLDB_SYMLINK_OUTPUT_FILE "lldb.so")
   endif()
@@ -54,7 +50,7 @@ function(finish_swig_lua swig_target lldb_lua_bindings_dir lldb_lua_target_dir)
   add_dependencies(lldb ${swig_target})
 
   if(LLDB_BUILD_FRAMEWORK)
-    set(LLDB_LUA_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python)
+    set(LLDB_LUA_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Lua)
   else()
     set(LLDB_LUA_INSTALL_PATH ${LLDB_LUA_RELATIVE_PATH})
   endif()


        


More information about the lldb-commits mailing list