From df88d517d3af7defcd882f113a8ac78e63ecac68 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 3 Jun 2021 12:18:13 +0200 Subject: [PATCH] llvmPackages: Extract the latest LLVM version from llvmPackages_latest That way we only have to bump the latest LLVM version in one place and avoid forgetting about the second occurrence like I did in #116646. --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 224e650d2e26..61653848507e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11415,6 +11415,8 @@ in llvm_5 = llvmPackages_5.llvm; llvmPackages = let + latest_version = lib.toInt + (lib.versions.major llvmPackages_latest.llvm.version); # This returns the minimum supported version for the platform. The # assumption is that or any later version is good. choose = platform: @@ -11423,7 +11425,7 @@ in else if platform.isAndroid then 12 else if platform.isLinux then (if platform.isRiscV then 9 else 7) else if platform.isWasm then 8 - else 11; # latest + else latest_version; # We take the "max of the mins". Why? Since those are lower bounds of the # supported version set, this is like intersecting those sets and then # taking the min bound of that.