diff options
author | Emery Hemingway <ehmry@posteo.net> | 2021-01-04 11:02:13 +0100 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2021-01-11 11:10:53 +0100 |
commit | 843daa841d71a31f3bd92b1c4ae5f17e9909009d (patch) | |
tree | 8817d7192442eeb2b603b776038b7c8c623eddcc | |
parent | c3c06134e2078fe0798507fc2ed57b9912106b1d (diff) |
llvmPackages: select version by targetPlatform
-rw-r--r-- | pkgs/stdenv/cross/default.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index 064e1836b17c..ed2b291ca2a1 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cfd791fb0891..9196cad2077a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; |