summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Afonso <antonio.afonso@gmail.com>2019-10-04 18:10:42 +0000
committerAntonio Afonso <antonio.afonso@gmail.com>2019-10-04 18:10:42 +0000
commitf6bedd81cca5c1a60ef5faa5a5e9cb3d5737ffdd (patch)
treed4bd40322aeb481f427e6d7c7d850591cfb05db1
parent432ae75f8bb2d1e13e71ddd347fa356d87459e58 (diff)
downloadbcm5719-llvm-f6bedd81cca5c1a60ef5faa5a5e9cb3d5737ffdd.tar.gz
bcm5719-llvm-f6bedd81cca5c1a60ef5faa5a5e9cb3d5737ffdd.zip
Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS
Summary: 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-python-scripts target and added the install-lldb-python-scripts llvm install target. I tested with: cmake ... -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_DISTRIBUTION_COMPONENTS="lldb;liblldb;lldb-python-scripts" ... DESTDIR=... ninja install-distribution Then checked with bin/lldb -x -o 'script import lldb' Reviewers: labath, xiaobai, clayborg, lanza Subscribers: mgorny, lldb-commits, smeenai, wallace Tags: #lldb Differential Revision: https://reviews.llvm.org/D68370 llvm-svn: 373768
-rw-r--r--lldb/scripts/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/scripts/CMakeLists.txt b/lldb/scripts/CMakeLists.txt
index ebe850c56c4..40ff2b285f7 100644
--- a/lldb/scripts/CMakeLists.txt
+++ b/lldb/scripts/CMakeLists.txt
@@ -69,5 +69,14 @@ if(NOT LLDB_BUILD_FRAMEWORK)
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Install the LLDB python module
- install(DIRECTORY ${SWIG_PYTHON_DIR}/ DESTINATION ${SWIG_INSTALL_DIR})
+ add_custom_target(lldb-python-scripts)
+ add_dependencies(lldb-python-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-python-scripts
+ COMPONENT lldb-python-scripts
+ DEPENDS lldb-python-scripts)
+ endif()
endif()
OpenPOWER on IntegriCloud