llvmPackages_git.clang: fix linker invocation with LLVMgold plugin

Ported from 3530837417da13076a2c8412de2c0c385dfbd648.

+5 -6
+5 -6
pkgs/development/compilers/llvm/git/clang/default.nix
··· 1 - { lib, stdenv, llvm_meta, src, cmake, libxml2, libllvm, version, python3 2 , buildLlvmTools 3 , fixDarwinDylibNames 4 , enableManpages ? false ··· 37 ./purity.patch 38 # https://reviews.llvm.org/D51899 39 ./gnu-install-dirs.patch 40 ]; 41 42 postPatch = '' ··· 52 53 outputs = [ "out" "lib" "dev" "python" ]; 54 55 - # Clang expects to find LLVMgold in its own prefix 56 postInstall = '' 57 - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then 58 - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib 59 - fi 60 - 61 ln -sv $out/bin/clang $out/bin/cpp 62 63 # Move libclang to 'lib' output
··· 1 + { lib, stdenv, llvm_meta, src, substituteAll, cmake, libxml2, libllvm, version, python3 2 , buildLlvmTools 3 , fixDarwinDylibNames 4 , enableManpages ? false ··· 37 ./purity.patch 38 # https://reviews.llvm.org/D51899 39 ./gnu-install-dirs.patch 40 + (substituteAll { 41 + src = ../../clang-11-12-LLVMgold-path.patch; 42 + libllvmLibdir = "${libllvm.lib}/lib"; 43 + }) 44 ]; 45 46 postPatch = '' ··· 56 57 outputs = [ "out" "lib" "dev" "python" ]; 58 59 postInstall = '' 60 ln -sv $out/bin/clang $out/bin/cpp 61 62 # Move libclang to 'lib' output