3
0
Fork 0
forked from mirrors/nixpkgs

ghcWithPackages: check targetPlatform to decide if NCG is available

The availability of native codegen (which allows us to disable the LLVM
backend by default) hinges on the target platform of the compiler (that
is GHC), not on the platform it runs on (the host platform).
This commit is contained in:
sternenseemann 2021-11-18 16:12:27 +01:00
parent 7207f809f9
commit cfdc073da4

View file

@ -1,5 +1,5 @@
{ lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper { lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
, withLLVM ? !(stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isPowerPC) , withLLVM ? !(stdenv.targetPlatform.isx86_64 || stdenv.targetPlatform.isPowerPC)
, postBuild ? "" , postBuild ? ""
, ghcLibdir ? null # only used by ghcjs, when resolving plugins , ghcLibdir ? null # only used by ghcjs, when resolving plugins
}: }: