summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDon Hinton <hintonda@gmail.com>2018-01-27 21:14:17 +0000
committerDon Hinton <hintonda@gmail.com>2018-01-27 21:14:17 +0000
commit87a6c64d80a7963c78a6fd89d72a327d42ae3fc3 (patch)
tree5baa96e1d1fb307dfe21164d57cb10f8a99e865d /cmake
parent286b899df64bb82a2da253114653adaf15da2fce (diff)
[cmake] [compiler-rt] Call llvm_setup_rpath() when adding shared libraries.
Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42462 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@323606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 437267318..f81eb3342 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -247,6 +247,9 @@ function(add_compiler_rt_runtime name type)
target_link_libraries(${libname} ${LIB_LINK_LIBS})
endif()
if(${type} STREQUAL "SHARED")
+ if(COMMAND llvm_setup_rpath)
+ llvm_setup_rpath(${libname})
+ endif()
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")