[LLVMdev] [PATCH] Use GCC_INSTALL_PREFIX for rpath if set.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jun 10 15:59:27 PDT 2014


On 29 May 2014 18:37, Russell Harmon <eatnumber1 at google.com> wrote:
> This way, an LLVM compiled after setting GCC_INSTALL_PREFIX will work correctly
> if you don't want to install LLVM into the GCC_INSTALL_PREFIX.
> ---
>  CMakeLists.txt | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 9ec3e33..c85a028 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -450,7 +450,12 @@ if (APPLE)
>    set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
>  else(UNIX)
>    if(NOT DEFINED CMAKE_INSTALL_RPATH)
> -    set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")

I do depend on $ORIGIN/../lib.

This makes sure that a shared build of llvm find the correct libraries
both in the build and the install directory. It also means that the
install directory is relocatable.

Cheers,
Rafael



More information about the llvm-dev mailing list