diff --git a/tools/repl/swift/CMakeLists.txt b/tools/repl/swift/CMakeLists.txt index 2515d86adab3..237e6ec06444 100644 --- a/tools/repl/swift/CMakeLists.txt +++ b/tools/repl/swift/CMakeLists.txt @@ -5,6 +5,7 @@ if (LLDB_BUILD_FRAMEWORK) elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" ) # Set the correct rpath to locate libswiftCore set(CMAKE_EXE_LINKER_FLAGS "-Wl,-rpath,${CMAKE_BINARY_DIR}/../swift-linux-x86_64/lib${LLVM_LIBDIR_SUFFIX}/swift/linux -Wl,-ldl") + set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib/swift/linux:${CMAKE_INSTALL_RPATH}") endif() add_lldb_tool(repl_swift