Skip to content

Commit 78fd93e

Browse files
committed
[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 llvm-svn: 323606
1 parent 247016a commit 78fd93e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ function(add_compiler_rt_runtime name type)
247247
target_link_libraries(${libname} ${LIB_LINK_LIBS})
248248
endif()
249249
if(${type} STREQUAL "SHARED")
250+
if(COMMAND llvm_setup_rpath)
251+
llvm_setup_rpath(${libname})
252+
endif()
250253
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
251254
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
252255
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")

0 commit comments

Comments
 (0)