llvmPackages: select version by targetPlatform

This commit is contained in:
Emery Hemingway 2021-01-04 11:02:13 +01:00
parent c3c06134e2
commit 843daa841d
2 changed files with 12 additions and 2 deletions

View File

@ -66,7 +66,7 @@ in lib.init bootStages ++ [
else if crossSystem.isDarwin
then buildPackages.llvmPackages.clang
else if crossSystem.useLLVM or false
then buildPackages.llvmPackages_8.lldClang
then buildPackages.llvmPackages.lldClang
else buildPackages.gcc;
extraNativeBuildInputs = old.extraNativeBuildInputs

View File

@ -10058,7 +10058,17 @@ in
llvm_6 = llvmPackages_6.llvm;
llvm_5 = llvmPackages_5.llvm;
llvmPackages = recurseIntoAttrs llvmPackages_7;
llvmPackages = recurseIntoAttrs (with targetPlatform;
if isDarwin then
llvmPackages_7
else if isFreeBSD then
llvmPackages_7
else if isLinux then
llvmPackages_7
else if isWasm then
llvmPackages_8
else
llvmPackages_latest);
llvmPackages_5 = callPackage ../development/compilers/llvm/5 {
inherit (stdenvAdapters) overrideCC;