From c858c42002313cc5f9c837c10d8b3babddc77b32 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sun, 8 Aug 2021 13:54:09 +0200 Subject: [PATCH] llvmPackages_13.clang: fix linker invocation with LLVMgold plugin Ported from 3530837417da13076a2c8412de2c0c385dfbd648. --- pkgs/development/compilers/llvm/13/clang/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/llvm/13/clang/default.nix b/pkgs/development/compilers/llvm/13/clang/default.nix index cfafe43c3a5f..78c2831a2f35 100644 --- a/pkgs/development/compilers/llvm/13/clang/default.nix +++ b/pkgs/development/compilers/llvm/13/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, src, cmake, libxml2, libllvm, version, python3 +{ lib, stdenv, llvm_meta, src, substituteAll, cmake, libxml2, libllvm, version, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -37,6 +37,10 @@ let ./purity.patch # https://reviews.llvm.org/D51899 ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-11-12-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -52,12 +56,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output