diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix index fcb4214a1de8..ca6723172d7a 100644 --- a/pkgs/development/compilers/llvm/3.8/llvm.nix +++ b/pkgs/development/compilers/llvm/3.8/llvm.nix @@ -49,7 +49,7 @@ in stdenv.mkDerivation rec { sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc substituteInPlace CMakeLists.txt \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ + --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \ --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" '' + '' diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix index 00c56e49e374..678ec759425d 100644 --- a/pkgs/development/compilers/llvm/3.9/llvm.nix +++ b/pkgs/development/compilers/llvm/3.9/llvm.nix @@ -82,7 +82,7 @@ in stdenv.mkDerivation rec { --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' substituteInPlace CMakeLists.txt \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ + --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$lib/lib")" \ --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}.