From cfb6649fa75b8cc8a97ccbce7ca9a6b9b26f8a29 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 29 Jul 2025 16:55:53 +0200 Subject: [PATCH] llvmPackages: drop libclc attributes that error libclc requires a compatible version of spirv-llvm-translator. If we don't have such a version, we get an eval error. This means that OfBorg builds of llvmPackages sets where libclc is unavailable will produce an eval error, which is very confusing. To fix this, restrict the libclc attribute to LLVM versions where it actually exists. Link: https://github.com/NixOS/nixpkgs/pull/414615#issuecomment-3126935312 --- pkgs/development/compilers/llvm/common/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index aa53be5b06b3..ce8caa3f01bf 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -477,12 +477,17 @@ let } // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "16") { mlir = callPackage ./mlir { }; - libclc = callPackage ./libclc { }; } // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "19") { bolt = callPackage ./bolt { }; } + // + lib.optionalAttrs + (lib.versionAtLeast metadata.release_version "16" && lib.versionOlder metadata.release_version "20") + { + libclc = callPackage ./libclc { }; + } ); libraries = lib.makeExtensible (