Skip to content

[lldb/lua] Fix Lua building on Windows #83871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

amordo
Copy link
Contributor

@amordo amordo commented Mar 4, 2024

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

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

Fixes #55075.

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

Replace 'Python' with 'Lua' in install path name.
@amordo amordo requested a review from JDevlieghere as a code owner March 4, 2024 16:44
@llvmbot llvmbot added the lldb label Mar 4, 2024
@llvmbot
Copy link
Member

llvmbot commented Mar 4, 2024

@llvm/pr-subscribers-lldb

Author: Alexander M. (amordo)

Changes

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

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

Fixes #55075.


Full diff: https://github.com/llvm/llvm-project/pull/83871.diff

1 Files Affected:

  • (modified) lldb/bindings/lua/CMakeLists.txt (+3-7)
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()

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JDevlieghere
Copy link
Member

@amordo I don't know if you have commit access. Let me you need someone to press the merge button for you.

@amordo
Copy link
Contributor Author

amordo commented Mar 4, 2024

@JDevlieghere I have no write access, looking for help:)

@JDevlieghere JDevlieghere merged commit 79e8f29 into llvm:main Mar 4, 2024
@amordo amordo deleted the fix-missed-liblldb-lua branch March 4, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake build: "Error copying file "../../../bin/liblldb.dll" to "_lldb.pyd"
3 participants