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
This commit is contained in:
Alyssa Ross 2025-07-29 16:55:53 +02:00
parent 2fd2baff9f
commit cfb6649fa7

View File

@ -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 (