From 156d8d619c727351d40ba67df60521b33698bf0c Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 24 Nov 2021 13:48:37 +0100 Subject: [PATCH] haskell.compiler.*: be clear about LLVM build->target role Since LLVM itself doesn't depend on target at all, this doesn't change anything *in effect* (i. e. rebuild count should be zero), but it is more clear about the intention and what LLVM is used for here (i. e. in depsBuildTarget). --- pkgs/development/compilers/ghc/8.10.7.nix | 4 ++-- pkgs/development/compilers/ghc/8.8.4.nix | 4 ++-- pkgs/development/compilers/ghc/9.0.1.nix | 4 ++-- pkgs/development/compilers/ghc/9.2.1.nix | 4 ++-- pkgs/development/compilers/ghc/head.nix | 4 ++-- pkgs/top-level/haskell-packages.nix | 12 ++++++------ 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index 7e59bd974a25..f0c57f7fae8b 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -15,7 +15,7 @@ , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. - buildLlvmPackages, llvmPackages + buildTargetLlvmPackages, llvmPackages , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. @@ -122,7 +122,7 @@ let toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc - ] ++ lib.optional useLLVM buildLlvmPackages.llvm; + ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; targetCC = builtins.head toolsForTarget; diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index 1d31ffba4111..49f45d856270 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -14,7 +14,7 @@ , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. - buildLlvmPackages, llvmPackages + buildTargetLlvmPackages, llvmPackages , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. @@ -130,7 +130,7 @@ let toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc - ] ++ lib.optional useLLVM buildLlvmPackages.llvm; + ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; targetCC = builtins.head toolsForTarget; diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index c0f42680bb87..005333a8d83e 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -16,7 +16,7 @@ , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. - buildLlvmPackages, llvmPackages + buildTargetLlvmPackages, llvmPackages , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. @@ -117,7 +117,7 @@ let toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc - ] ++ lib.optional useLLVM buildLlvmPackages.llvm; + ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; targetCC = builtins.head toolsForTarget; diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index e43dea9cffb7..2ebbdc63ac93 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -16,7 +16,7 @@ , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. - buildLlvmPackages, llvmPackages + buildTargetLlvmPackages, llvmPackages , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. @@ -117,7 +117,7 @@ let toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc - ] ++ lib.optional useLLVM buildLlvmPackages.llvm; + ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; targetCC = builtins.head toolsForTarget; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 1010d460b030..f50b3b76e15d 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -21,7 +21,7 @@ , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. - buildLlvmPackages, llvmPackages + buildTargetLlvmPackages, llvmPackages , # If enabled, GHC will be built with the GPL-free but slightly slower native # bignum backend instead of the faster but GPLed gmp backend. @@ -130,7 +130,7 @@ let toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc - ] ++ lib.optional useLLVM buildLlvmPackages.llvm; + ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; targetCC = builtins.head toolsForTarget; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index bf340c10cb3b..4cf186715b8b 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -1,4 +1,4 @@ -{ buildPackages, pkgs, newScope, stdenv }: +{ buildPackages, pkgsBuildTarget, pkgs, newScope, stdenv }: let # These are attributes in compiler and packages that don't support integer-simple. @@ -79,7 +79,7 @@ in { else packages.ghc865Binary; inherit (buildPackages.python3Packages) sphinx; - buildLlvmPackages = buildPackages.llvmPackages_7; + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_7; llvmPackages = pkgs.llvmPackages_7; }; ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix { @@ -96,7 +96,7 @@ in { # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_9; + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_9; llvmPackages = pkgs.llvmPackages_9; }; ghc901 = callPackage ../development/compilers/ghc/9.0.1.nix { @@ -109,7 +109,7 @@ in { packages.ghc8107Binary; inherit (buildPackages.python3Packages) sphinx; inherit (buildPackages.darwin) autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_10; + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; }; ghc921 = callPackage ../development/compilers/ghc/9.2.1.nix { @@ -124,7 +124,7 @@ in { # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_10; + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { @@ -134,7 +134,7 @@ in { # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_10; + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; libffi = pkgs.libffi; };