Skip to content

Commit 31ea714

Browse files
committed
Add rpath to liblldb so vendors can ship their own python framework (or others)
Summary: I want to be able to specify which python framework to use for lldb in macos. With python2.7 we could just rely on the MacOS one but python3.7 is not shipped with the OS. An alternative is to use the one shipped with Xcode but that could be path dependent or maybe the user doesn't have Xcode installed at all. A definite solution is to just ship a python framework with lldb. To make this possible I added "@loader_path/../../../" to the rpath so it points to the same directory as the LLDB.framework, this way we can just drop any frameworks there. Reviewers: hhb, sgraenitz, xiaobai, smeenai, beanz, labath Reviewed By: labath Subscribers: beanz, labath, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69931
1 parent 4187cb1 commit 31ea714

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lldb/cmake/modules/LLDBFramework.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,8 @@ if(NOT IOS)
120120
COMMENT "LLDB.framework: copy clang vendor-specific headers"
121121
)
122122
endif()
123+
124+
# Add an rpath pointing to the directory where LLDB.framework is installed.
125+
# This allows frameworks (relying on @rpath) to be installed in the same folder and found at runtime.
126+
set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH
127+
"@loader_path/../../../")

0 commit comments

Comments
 (0)