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