From a1f49393943deb9c6cdb05cbf3fe037cbe4d9da7 Mon Sep 17 00:00:00 2001 From: misuzu Date: Mon, 28 Jul 2025 10:47:16 +0300 Subject: [PATCH] llvmPackages_20.llvm: fix test failure on riscv64 --- .../compilers/llvm/common/llvm/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/common/llvm/default.nix b/pkgs/development/compilers/llvm/common/llvm/default.nix index b25272ba5aad..5d8506627aa7 100644 --- a/pkgs/development/compilers/llvm/common/llvm/default.nix +++ b/pkgs/development/compilers/llvm/common/llvm/default.nix @@ -294,7 +294,18 @@ stdenv.mkDerivation ( ++ lib.optional (lib.versionAtLeast release_version "15") # Just like the `llvm-lit-cfg` patch, but for `polly`. - (getVersionFile "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch"); + (getVersionFile "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch") + ++ + lib.optional (lib.versions.major release_version == "20" && stdenv.hostPlatform.isRiscV) + # Test failure on riscv64, fixed in llvm 21 + # https://github.com/llvm/llvm-project/issues/150818 + ( + fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/bd49bbaaafc98433a2cb4e95ce25b7a201baf5a5.patch"; + hash = "sha256-3hkbYPUVRAtWpo5qBmc2jLZLivURMx8T0GQomvNZesc="; + stripLen = 1; + } + ); nativeBuildInputs = [ cmake