Skip to content

Commit

Permalink
Reland: [cmake] [libcxx] Call llvm_setup_rpath() when adding shared l…
Browse files Browse the repository at this point in the history
…ibraries.

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/D42459

llvm-svn: 323492
  • Loading branch information
donhinton committed Jan 26, 2018
1 parent 1634c15 commit d21aeff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcxx/lib/CMakeLists.txt
Expand Up @@ -222,6 +222,9 @@ set(LIBCXX_TARGETS)
# Build the shared library.
if (LIBCXX_ENABLE_SHARED)
add_library(cxx_shared SHARED $<TARGET_OBJECTS:cxx_objects>)
if(LLVM_FOUND)
llvm_setup_rpath(cxx_shared)
endif()
target_link_libraries(cxx_shared ${LIBCXX_LIBRARIES})
set_target_properties(cxx_shared
PROPERTIES
Expand Down

0 comments on commit d21aeff

Please sign in to comment.