haskell.compiler.ghc*: assert cross is possible
This commit is contained in:
committed by
sternenseemann
parent
35d77dde97
commit
d3bad45240
@@ -77,6 +77,9 @@ assert !enableIntegerSimple -> gmp != null;
|
||||
# see note [HADDOCK_DOCS].
|
||||
assert (stdenv.buildPlatform != stdenv.hostPlatform || stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
|
||||
|
||||
# GHC does not support building when all 3 platforms are different.
|
||||
assert stdenv.buildPlatform == stdenv.hostPlatform || stdenv.hostPlatform == stdenv.targetPlatform;
|
||||
|
||||
let
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
|
||||
@@ -239,6 +239,12 @@
|
||||
|
||||
assert !enableNativeBignum -> gmp != null;
|
||||
|
||||
# GHC does not support building when all 3 platforms are different.
|
||||
assert stdenv.buildPlatform == stdenv.hostPlatform || stdenv.hostPlatform == stdenv.targetPlatform;
|
||||
|
||||
# It is currently impossible to cross-compile GHC with Hadrian.
|
||||
assert stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
|
||||
let
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -359,13 +365,6 @@ let
|
||||
|
||||
in
|
||||
|
||||
# C compiler, bintools and LLVM are used at build time, but will also leak into
|
||||
# the resulting GHC's settings file and used at runtime. This means that we are
|
||||
# currently only able to build GHC if hostPlatform == buildPlatform.
|
||||
assert !targetPlatform.isGhcjs -> targetCC == pkgsHostTarget.targetPackages.stdenv.cc;
|
||||
assert buildTargetLlvmPackages.llvm == llvmPackages.llvm;
|
||||
assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
pname = "${targetPrefix}ghc${variantSuffix}";
|
||||
inherit version;
|
||||
|
||||
@@ -82,6 +82,9 @@ assert !enableNativeBignum -> gmp != null;
|
||||
# see note [HADDOCK_DOCS].
|
||||
assert (stdenv.buildPlatform != stdenv.hostPlatform || stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram;
|
||||
|
||||
# GHC does not support building when all 3 platforms are different.
|
||||
assert stdenv.buildPlatform == stdenv.hostPlatform || stdenv.hostPlatform == stdenv.targetPlatform;
|
||||
|
||||
let
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user