[Lldb-commits] [PATCH] D68370: Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS

António Afonso via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 2 19:25:13 PDT 2019


aadsm created this revision.
aadsm added reviewers: labath, xiaobai, clayborg, lanza.
Herald added subscribers: lldb-commits, mgorny.
Herald added a project: LLDB.

I'd like to install lldb using the install-distribution target with LLVM_DISTRIBUTION_COMPONENTS but this is currently not possible as the lldb/scripts do not provide any component we can use and install the python scripts.
For this effect I created an lldb-scripts target and added the install-lldb-scripts llvm install target.

I tested with:
cmake ... -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_DISTRIBUTION_COMPONENTS="lldb;liblldb;lldb-scripts" ...
DESTDIR=... ninja install-distribution

Then checked with bin/lldb -x -o 'script import lldb'

Question:
Since the lldb component is basically useless without at least liblldb would it make sense to make it depending on liblldb and this new lldb-scripts components?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68370

Files:
  lldb/scripts/CMakeLists.txt


Index: lldb/scripts/CMakeLists.txt
===================================================================
--- lldb/scripts/CMakeLists.txt
+++ lldb/scripts/CMakeLists.txt
@@ -69,5 +69,14 @@
     OUTPUT_STRIP_TRAILING_WHITESPACE)
 
   # Install the LLDB python module
-  install(DIRECTORY ${SWIG_PYTHON_DIR}/ DESTINATION ${SWIG_INSTALL_DIR})
+  add_custom_target(lldb-scripts)
+  add_dependencies(lldb-scripts finish_swig)
+  install(DIRECTORY ${SWIG_PYTHON_DIR}/
+    DESTINATION ${SWIG_INSTALL_DIR}
+    COMPONENT lldb-scripts)
+  if (NOT LLVM_ENABLE_IDE)
+    add_llvm_install_targets(install-lldb-scripts
+                             COMPONENT lldb-scripts
+                             DEPENDS lldb-scripts)
+  endif()
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68370.222956.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191003/1a821682/attachment.bin>


More information about the lldb-commits mailing list