diff options
| author | António Afonso <aadsm@fb.com> | 2019-11-11 13:39:30 -0800 |
|---|---|---|
| committer | António Afonso <aadsm@fb.com> | 2019-11-11 19:23:10 -0800 |
| commit | 31ea714e9a94d3912988c06139cb987e14478e84 (patch) | |
| tree | 5b04d496007b8837c25210e5ad64035395e3b38e | |
| parent | 4187cb138b1c8401a78ac2ea98466c750cce61cb (diff) | |
| download | bcm5719-llvm-31ea714e9a94d3912988c06139cb987e14478e84.tar.gz bcm5719-llvm-31ea714e9a94d3912988c06139cb987e14478e84.zip | |
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
| -rw-r--r-- | lldb/cmake/modules/LLDBFramework.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/cmake/modules/LLDBFramework.cmake b/lldb/cmake/modules/LLDBFramework.cmake index b6488936806..fd4c2e41d76 100644 --- a/lldb/cmake/modules/LLDBFramework.cmake +++ b/lldb/cmake/modules/LLDBFramework.cmake @@ -120,3 +120,8 @@ if(NOT IOS) COMMENT "LLDB.framework: copy clang vendor-specific headers" ) endif() + +# Add an rpath pointing to the directory where LLDB.framework is installed. +# This allows frameworks (relying on @rpath) to be installed in the same folder and found at runtime. +set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH + "@loader_path/../../../") |

