Merge pull request #265490 from alyssais/compiler-rt-16-freebsd

llvmPackages_16.compiler-rt: fix FreeBSD build
This commit is contained in:
Weijia Wang 2023-11-09 06:12:20 +01:00 committed by GitHub
commit 83bfbf0213
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,7 +121,7 @@ stdenv.mkDerivation {
# Hack around weird upsream RPATH bug # Hack around weird upsream RPATH bug
postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin) '' postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
ln -s "$out/lib"/*/* "$out/lib" ln -s "$out/lib"/*/* "$out/lib"
'' + lib.optionalString (useLLVM && !stdenv.hostPlatform.isWasm) '' '' + lib.optionalString (useLLVM && stdenv.hostPlatform.isLinux) ''
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
# Note the history of crt{begin,end}S in previous versions of llvm in nixpkg: # Note the history of crt{begin,end}S in previous versions of llvm in nixpkg: