Skip to content

Commit

Permalink
Merge pull request #123200 from s1341/fix_max_llvm_packages
Browse files Browse the repository at this point in the history
Fix max llvm packages from string comparison to int comparison
  • Loading branch information
Ericson2314 authored May 16, 2021
2 parents 3f061ca + 6e17785 commit 39ca997
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11224,16 +11224,17 @@ in
# This returns the minimum suported version for the platform. The
# assumption is that or any later version is good.
choose = platform:
/**/ if platform.isDarwin then "7"
else if platform.isFreeBSD then "7"
else if platform.isAndroid then "12"
else if platform.isLinux then "7"
else if platform.isWasm then "8"
else "latest";
/**/ if platform.isDarwin then 7
else if platform.isFreeBSD then 7
else if platform.isAndroid then 12
else if platform.isLinux then 7
else if platform.isWasm then 8
else 11; # latest
# 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.
minSupported = lib.max (choose stdenv.hostPlatform) (choose stdenv.targetPlatform);
minSupported = toString (lib.trivial.max (choose stdenv.hostPlatform) (choose
stdenv.targetPlatform));
in pkgs.${"llvmPackages_${minSupported}"};

llvmPackages_5 = recurseIntoAttrs (callPackage ../development/compilers/llvm/5 {
Expand Down

0 comments on commit 39ca997

Please sign in to comment.