aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix b/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
index 06266556cf3..a5d2bb5c88d 100644
--- a/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
@@ -59,8 +59,15 @@ let
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
- '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
- Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+ ''
+ # We only need to build stage1 on most cross-compilation because
+ # we will be running the compiler on the native system. In some
+ # situations, like native Musl compilation, we need the compiler
+ # to actually link to our new Libc. The iOS simulator is a special
+ # exception because we can’t actually run simulators binaries
+ # ourselves.
+ + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+ Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO