From: Peter Collingbourne Date: Mon, 28 Nov 2016 21:59:14 +0000 (+0000) Subject: cmake: Set rpath for loadable modules as well as shared libraries. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f75edf088fea6171e167f7dcc66f27750fb8cf24;p=llvm 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288076 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 2603f0765f9..eb5ae8de56a 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -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})