From 71a741517a6f92acfa17d3ef4ecc2724aaa79f5e Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Fri, 27 Oct 2023 18:20:22 -0400 Subject: llvmPackages_16.compiler-rt: fix wasi32 build --- pkgs/development/compilers/llvm/16/compiler-rt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/compilers/llvm/16/compiler-rt/default.nix') diff --git a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix b/pkgs/development/compilers/llvm/16/compiler-rt/default.nix index fc0d7533c99..e45d1f8660b 100644 --- a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/16/compiler-rt/default.nix @@ -119,9 +119,9 @@ stdenv.mkDerivation { ''; # Hack around weird upsream RPATH bug - postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) '' + postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin) '' ln -s "$out/lib"/*/* "$out/lib" - '' + lib.optionalString (useLLVM) '' + '' + lib.optionalString (useLLVM && !stdenv.hostPlatform.isWasm) '' ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.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: -- cgit 1.4.1 From 772a2502f145f17ee6b08c1d3e28b6e10ea105e9 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 4 Nov 2023 18:08:31 +0100 Subject: llvmPackages_16.compiler-rt: fix FreeBSD build The clang_rt.crt* files are only built on Linux (see the COMPILER_RT_HAS_CRT CMake variable). --- pkgs/development/compilers/llvm/16/compiler-rt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development/compilers/llvm/16/compiler-rt/default.nix') diff --git a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix b/pkgs/development/compilers/llvm/16/compiler-rt/default.nix index e45d1f8660b..9b6ab0a77c2 100644 --- a/pkgs/development/compilers/llvm/16/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/16/compiler-rt/default.nix @@ -121,7 +121,7 @@ stdenv.mkDerivation { # Hack around weird upsream RPATH bug postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin) '' 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.crtend-*.o $out/lib/crtend.o # Note the history of crt{begin,end}S in previous versions of llvm in nixpkg: -- cgit 1.4.1