summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Hinton <hintonda@gmail.com>2018-01-26 01:34:51 +0000
committerDon Hinton <hintonda@gmail.com>2018-01-26 01:34:51 +0000
commitd21aeffc860bef25bd3ccf9999ae4adda6d20b3f (patch)
tree689c2b72ced563807c02488331c0db63469005b9
parent1634c15e3c7e57bf95bb2bab7f5ea6a8a353d7c8 (diff)
downloadbcm5719-llvm-d21aeffc860bef25bd3ccf9999ae4adda6d20b3f.tar.gz
bcm5719-llvm-d21aeffc860bef25bd3ccf9999ae4adda6d20b3f.zip
Reland: [cmake] [libcxx] 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/D42459 llvm-svn: 323492
-rw-r--r--libcxx/lib/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt
index aa5ebf1568e..e7de4e3a084 100644
--- a/libcxx/lib/CMakeLists.txt
+++ b/libcxx/lib/CMakeLists.txt
@@ -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
OpenPOWER on IntegriCloud