[Lldb-commits] [lldb] 21afedd - [lldb/CMake] Use INSTALL_RPATH for tools and BUILD_RPATH for unittests.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 30 13:20:13 PDT 2020


Author: Jonas Devlieghere
Date: 2020-04-30T13:20:06-07:00
New Revision: 21afeddfb25fbde260f84ee6ceaa61e761c1e48c

URL: https://github.com/llvm/llvm-project/commit/21afeddfb25fbde260f84ee6ceaa61e761c1e48c
DIFF: https://github.com/llvm/llvm-project/commit/21afeddfb25fbde260f84ee6ceaa61e761c1e48c.diff

LOG: [lldb/CMake] Use INSTALL_RPATH for tools and BUILD_RPATH for unittests.

It seems like only the unittests are building with
BUILD_WITH_INSTALL_RPATH set to OFF. Of course when I did my last change
I only ran check-lldb-unit. Not sure why this difference exists, why
would you even install the unittest?

For the LLDB framework we do need different build and install RPATHs.
Currently that logic lives downstream. I plan to upstream that in the
near future. For now I'm just trying to make it possible to run the
test.

Added: 
    

Modified: 
    lldb/source/API/CMakeLists.txt
    lldb/tools/lldb-test/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index e1371fd71c02..ae6f2e8e3251 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -121,7 +121,7 @@ if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX A
 endif()
 
 if(PYTHON_RPATH)
-  set_property(TARGET liblldb APPEND PROPERTY BUILD_RPATH "${PYTHON_RPATH}")
+  set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "${PYTHON_RPATH}")
 endif()
 
 if (MSVC)

diff  --git a/lldb/tools/lldb-test/CMakeLists.txt b/lldb/tools/lldb-test/CMakeLists.txt
index 8574150ab918..60b4a7ca8f70 100644
--- a/lldb/tools/lldb-test/CMakeLists.txt
+++ b/lldb/tools/lldb-test/CMakeLists.txt
@@ -25,7 +25,7 @@ add_lldb_tool(lldb-test
   )
 
 if(PYTHON_RPATH)
-  set_property(TARGET lldb-test APPEND PROPERTY BUILD_RPATH "${PYTHON_RPATH}")
+  set_property(TARGET lldb-test APPEND PROPERTY INSTALL_RPATH "${PYTHON_RPATH}")
 endif()
 
 target_include_directories(lldb-test PRIVATE ${LLDB_SOURCE_DIR}/source)


        


More information about the lldb-commits mailing list