llvmPackages_13.clang: fix linker invocation with LLVMgold plugin
Ported from 3530837417
.
This commit is contained in:
parent
fff53fa030
commit
c858c42002
|
@ -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
|
, buildLlvmTools
|
||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
, enableManpages ? false
|
, enableManpages ? false
|
||||||
|
@ -37,6 +37,10 @@ let
|
||||||
./purity.patch
|
./purity.patch
|
||||||
# https://reviews.llvm.org/D51899
|
# https://reviews.llvm.org/D51899
|
||||||
./gnu-install-dirs.patch
|
./gnu-install-dirs.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../../clang-11-12-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -52,12 +56,7 @@ let
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
outputs = [ "out" "lib" "dev" "python" ];
|
||||||
|
|
||||||
# Clang expects to find LLVMgold in its own prefix
|
|
||||||
postInstall = ''
|
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
|
ln -sv $out/bin/clang $out/bin/cpp
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
# Move libclang to 'lib' output
|
||||||
|
|
Loading…
Reference in a new issue