cmake: Set rpath for loadable modules as well as shared libraries.

This fixes a regression introduced by r285714: we weren't setting the
rpath on LLVMgold.so correctly.

Spotted by mark@chromium.org!

Differential Revision: https://reviews.llvm.org/D27176

llvm-svn: 288076
This commit is contained in:
Peter Collingbourne 2016-11-28 21:59:14 +00:00
parent 2a06f6629d
commit 1c65e3e9b2

View File

@ -412,6 +412,7 @@ function(llvm_add_library name)
if(ARG_MODULE)
add_library(${name} MODULE ${ALL_FILES})
llvm_setup_rpath(${name})
elseif(ARG_SHARED)
add_windows_version_resource_file(ALL_FILES ${ALL_FILES})
add_library(${name} SHARED ${ALL_FILES})