[Lldb-commits] [PATCH] D55330: [CMake] Revised RPATH handling

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 5 08:23:35 PST 2018


sgraenitz created this revision.
sgraenitz added reviewers: xiaobai, JDevlieghere, aprantl, clayborg.
Herald added subscribers: mgorny, ki.stfu.

If we build LLDB.framework, dependant tools need appropriate RPATHs in both locations, the build-tree (for testing) and the install-tree (for deployment). Luckily, CMake can handle it for us: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling.

- In the build-tree, tools use the absolute path to the framework's actual output location.
- In the install-tree, tools get a list of RPATHs to look for the framework when deployed.

`LLDB_FRAMEWORK_INSTALL_DIR` is added to the `CMAKE_INSTALL_PREFIX` to change the relative location of LLDB.framework in the install-tree. If it is not empty, it will be added as an additional RPATH to all dependant tools (so they are functional in the install-tree). If it is empty, LLDB.framework goes to the root of the install-tree. Tools will not be functional in the direcoty structure of the LLVM install-tree. 
For historical reasons `LLDB_FRAMEWORK_INSTALL_DIR` defaults to "Library/Frameworks".


https://reviews.llvm.org/D55330

Files:
  cmake/modules/AddLLDB.cmake
  cmake/modules/LLDBConfig.cmake
  tools/driver/CMakeLists.txt
  tools/lldb-mi/CMakeLists.txt
  tools/lldb-vscode/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55330.176835.patch
Type: text/x-patch
Size: 4229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181205/18f0ef8e/attachment.bin>


More information about the lldb-commits mailing list