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).
useLLVM is what we are using in the GHC derivations already -- for
better or for worse -- so we should rename the argument here for
consistency which we are free to do as this is purely internal at the
moment (with overriding being impossible).
This means we only have to update the llvmPackages attribute in one
place now and should prevent situations like with 8.6.5 where different
versions would be used in the package set compared to the compiler
build.
Drop comments in the configuration-ghc-X.Y.x.nix files as well, since
LLVM version isn't tied to the compiler minor version at
all (e. g. 8.10.2 and 8.10.7 have different support ranges).
This check was wrong and caused by a bit of confusion on my part.
GHC >= 8.10.5 && < 9 supports aarch64-darwin via LLVM and GHC >= 9.2.1
introduces the NCG backend for aarch64-darwin.
A lot of these packages are not in stackage for some reason, so we need
to add some extra constraints to keep the packages stackage-compatible.
Some newly uploaded packages will become broken, as they've never had a
version compatible with haskell-gi 0.25.
Since hledger-lib 1.23 won't build with the latest doctest, there's
likely a change in behavior somewhere. 0.18.2 is then the closest
doctest to stackage's which works with GHC >= 9, so let's stick with it
for now.
Based on https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms, although
it sadly doesn't list when the backends were introduced.
* PowerPC, x86 (and x86_64) and Sparc have been supported for longer.
* aarch64-darwin is new in 9.2.1 and backported to 8.10.5, 8.10.6 and
8.10.7 (check is dumb here since we'll grep for 8.10.7 anyways when
upgrading)
Fixes ghcWithPackages failing to evaluate on aarch64-darwin because of
missing support for the platform in LLVM 9's compiler-rt.
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).
Move everything into a single overrideCabal and express conditionality
using optionalAttrs. This should make it easier to add
more (un)conditional overrides in the future.
PR was merged after the switch to haskell.lib.compose by default, but
originally created before that day, so the argument order used was
completely wrong, but CI didn't show it, because its state was stale.