blob: ea2a8af23c09ad9667ef9f1535c81096b73d6936 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# Determines whether the Native Code Generation (NCG) backend of the given
# GHC `version` is supported for compiling to `stdenv.targetPlatform`.
{
version,
stdenv,
lib,
}:
stdenv.targetPlatform.isx86
|| stdenv.targetPlatform.isPower
|| (lib.versionOlder version "9.4" && stdenv.targetPlatform.isSparc)
|| (lib.versionAtLeast version "9.2" && stdenv.targetPlatform.isAarch64)
|| (lib.versionAtLeast version "9.6" && stdenv.targetPlatform.isGhcjs)
|| (lib.versionAtLeast version "9.12" && stdenv.targetPlatform.isRiscV64)
|| (lib.versionAtLeast version "9.14" && stdenv.targetPlatform.isLoongArch64)
|