clang: only link if LLVMgold exists

buildEnv now errors with broken symlinks. Lots of things like this
still exist.

Discussion in #39038.
This commit is contained in:
Matthew Bauer
2018-04-17 09:50:21 -05:00
parent 9487244703
commit 7b73c7f49a
7 changed files with 28 additions and 7 deletions
@@ -53,7 +53,10 @@ let
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp