[compiler-rt] r323606 - [cmake] [compiler-rt] Call llvm_setup_rpath() when adding shared libraries.

Don Hinton via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 27 13:14:17 PST 2018


Author: dhinton
Date: Sat Jan 27 13:14:17 2018
New Revision: 323606

URL: http://llvm.org/viewvc/llvm-project?rev=323606&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake

Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=323606&r1=323605&r2=323606&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Sat Jan 27 13:14:17 2018
@@ -247,6 +247,9 @@ function(add_compiler_rt_runtime name ty
       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")




More information about the llvm-commits mailing list