about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/with-packages-wrapper.nix
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2021-11-25 17:14:21 +0100
committersternenseemann <sternenseemann@systemli.org>2021-11-25 19:28:57 +0100
commit50f256f5efb8ec79a76c5de0c4d37d84643a98e8 (patch)
tree354fac53808b8c0c069027d1dd55a06d4794a821 /pkgs/development/haskell-modules/with-packages-wrapper.nix
parenta7c564596e195cf9aa46ad2762f78e4d9cc9789b (diff)
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).
Diffstat (limited to 'pkgs/development/haskell-modules/with-packages-wrapper.nix')
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix14
1 files 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 f7bebbc4aa07e..e5fe60a0ae5c2 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
 }: