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