haskell.compiler.ghc981: build stage 2 compiler for “native cross”
When we are building compiler for a platform we can execute ourselves, we can build a proper stage2 compiler which unlocks some features that are interesting for e.g. pkgsStatic. The resulting compiler is technically a native compiler that's prefixed.
This commit is contained in:
parent
179f8e0aa4
commit
1dc7345389
|
@ -116,8 +116,11 @@
|
|||
-- no way to set this via the command line
|
||||
finalStage :: Stage
|
||||
finalStage = ${
|
||||
if stdenv.hostPlatform == stdenv.targetPlatform
|
||||
then "Stage2" # native compiler
|
||||
# Always build the stage 2 compiler if possible. Note we can currently
|
||||
# assume hostPlatform == buildPlatform.
|
||||
# TODO(@sternenseemann): improve this condition when we can cross-compile GHC
|
||||
if stdenv.hostPlatform.canExecute stdenv.targetPlatform
|
||||
then "Stage2" # native compiler or “native” cross e.g. pkgsStatic
|
||||
else "Stage1" # cross compiler
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue