smeenai added a comment.
In D69931#1739063 <https://reviews.llvm.org/D69931#1739063>, @beanz wrote:
> It is a bit gross that Python does an @rpath install name, that is generally
> against convention. I can see adding an option to add rpaths to liblldb
> making sense. I certainly agree LLDB shouldn't be in the business of
> packaging transitive dependencies.
>
> In a broader sense, Frameworks are dylibs. They can have all the same rpath
> magic that a dylib has. When you link a macho, the static linker pulls the
> install_name from each dylib you link against and embeds those as the dylibs
> to load. Since Python 3.7's install_name is @rpath based, it means that the
> dynamic linker will look for it in all the @rpath-relative locations
> specified by liblldb when linking. The proposed path in this patch, `-rpath
> "@loader_path/../../../"`, uses the @loader_path expansion which is the
> directory containing the binary that the load command is in (in this case
> liblldb's directory). Popping 3 directories up from that is likely not sane
> in most build configurations, but if it works for you meh...
The assumption here is that you'd have a directory layout like the following:
|- LLDB.framework
|- Versions
|- A
|- LLDB
|- Python3.framework
|- Versions
|- 3.7
|- Python3
`Python3`'s install name is `@rpath/Python3.framework/Versions/3.7/Python3`, so
by adding `-rpath "@loader_path/../../.."` to `LLDB`, you make @labath's
request work:
In D69931#1738285 <https://reviews.llvm.org/D69931#1738285>, @labath wrote:
> Is it possible to do something like that with the framework build too? I.e.,
> set the rpath of the LLDB.framework so that it searches for dependencies next
> to the framework itself? Then you'd just need to drop the python framework
> next to lldb...
The assumption, of course, is that LLDB is being built as a framework as well,
but I believe that's the standard setup on Darwin.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69931/new/
https://reviews.llvm.org/D69931
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits