From 50f256f5efb8ec79a76c5de0c4d37d84643a98e8 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 17:14:21 +0100 Subject: [PATCH] ghcWithPackages: don't wrap GHC with LLVM unnecessarily Since GHC now will have LLVM available when needed, we don't need to add it in the wrapper anymore. It can still be added if NCG is available, but -fllvm should be used (e. g. to work around an NCG bug). --- .../haskell-modules/with-packages-wrapper.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index f7bebbc4aa07..e5fe60a0ae5c 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -1,14 +1,8 @@ { lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper -# Include LLVM by default if GHC doesn't have native code generation support -# See https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms -, useLLVM ? !(lib.any lib.id ([ - stdenv.targetPlatform.isx86 - stdenv.targetPlatform.isPowerPC - stdenv.targetPlatform.isSparc - ] ++ lib.optionals (lib.versionAtLeast ghc.version "9.2") [ - (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin) - # TODO(@sternenseemann): Is armv7a supported for iOS? - ])) +# GHC will have LLVM available if necessary for the respective target, +# so useLLVM only needs to be changed if -fllvm is to be used for a +# platform that has NCG support +, useLLVM ? false , postBuild ? "" , ghcLibdir ? null # only used by ghcjs, when resolving plugins }: