From b140ab651684ecf9fc011981f6107b386a7bbcaa Mon Sep 17 00:00:00 2001 From: Butta Date: Tue, 22 Sep 2020 14:45:47 +0530 Subject: [PATCH] [linux] remove absolute rpath of /usr/lib/swift/linux added to many shared libraries This was presumably added as a backup, in case the libraries in a toolchain couldn't be found, but will not work well, so take it out. --- cmake/modules/AddSwift.cmake | 2 +- stdlib/cmake/modules/AddSwiftStdlib.cmake | 2 +- tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake index 550b459848483..507cb3c2b2fb8 100644 --- a/cmake/modules/AddSwift.cmake +++ b/cmake/modules/AddSwift.cmake @@ -618,7 +618,7 @@ function(_add_swift_host_library_single target) elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "LINUX") set_target_properties("${target}" PROPERTIES - INSTALL_RPATH "$ORIGIN:/usr/lib/swift/linux") + INSTALL_RPATH "$ORIGIN") elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "CYGWIN") set_target_properties("${target}" PROPERTIES diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake index 3ddfa28e3a800..58e06baef3c34 100644 --- a/stdlib/cmake/modules/AddSwiftStdlib.cmake +++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake @@ -949,7 +949,7 @@ function(_add_swift_target_library_single target name) elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX") set_target_properties("${target}" PROPERTIES - INSTALL_RPATH "$ORIGIN:/usr/lib/swift/linux") + INSTALL_RPATH "$ORIGIN") elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "CYGWIN") set_target_properties("${target}" PROPERTIES diff --git a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake index 7a77e125f955f..19103c094b338 100644 --- a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake +++ b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake @@ -168,7 +168,7 @@ macro(add_sourcekit_library name) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") if(SOURCEKITLIB_SHARED) set_target_properties(${name} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) - set_target_properties(${name} PROPERTIES INSTALL_RPATH "$ORIGIN/../lib/swift/linux:/usr/lib/swift/linux") + set_target_properties(${name} PROPERTIES INSTALL_RPATH "$ORIGIN/../lib/swift/linux") endif() endif()