Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix max llvm packages from string comparison to int comparison #123200

Merged
merged 1 commit into from
May 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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