Merge pull request #146493 from sternenseemann/ghc-with-packages-native-codegen

ghcWithPackages: fix / update LLVM deactivation if NCG is available
This commit is contained in:
sterni 2021-11-20 16:34:16 +01:00 committed by GitHub
commit ca929af2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,14 @@
{ lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
, withLLVM ? !(stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isPowerPC)
# Include LLVM by default if GHC doesn't have native code generation support
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms
, withLLVM ? !(lib.any lib.id ([
stdenv.targetPlatform.isx86
stdenv.targetPlatform.isPowerPC
stdenv.targetPlatform.isSparc
] ++ lib.optionals (lib.versionAtLeast ghc.version "9.2" || ghc.version == "8.10.7") [
(stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)
# TODO(@sternenseemann): Is armv7a supported for iOS?
]))
, postBuild ? ""
, ghcLibdir ? null # only used by ghcjs, when resolving plugins
}: