Commit cfb6649f authored by Alyssa Ross's avatar Alyssa Ross
Browse files

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
parent 2fd2baff
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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 (