Skip to content

Commit

Permalink
Merge pull request #61336 from matthewbauer/ghc-ncg-cross
Browse files Browse the repository at this point in the history
Use ncg for x86 ghc cross compilation
  • Loading branch information
Ericson2314 committed May 13, 2019
2 parents 1df1834 + 490d9fd commit 59a733e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
5 changes: 3 additions & 2 deletions pkgs/development/compilers/ghc/8.6.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
, # GHC can be built with system libffi or a bundled one.
libffi ? null

, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
Expand All @@ -31,7 +31,8 @@

, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")

, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/compilers/ghc/8.6.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
, # GHC can be built with system libffi or a bundled one.
libffi ? null

, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
Expand All @@ -31,7 +31,8 @@

, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")

, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/compilers/ghc/8.8.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
, # GHC can be built with system libffi or a bundled one.
libffi ? null

, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
Expand All @@ -31,7 +31,8 @@

, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")

, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/compilers/ghc/head.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

, libiconv ? null, ncurses

, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
, useLLVM ? !stdenv.targetPlatform.isx86
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
Expand All @@ -29,7 +29,8 @@
, version ? "8.7.20190115"
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")

, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/release-cross.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let
buildPackages.gcc = nativePlatforms;
coreutils = nativePlatforms;
haskell.packages.ghcHEAD.hello = nativePlatforms;
haskell.packages.ghc844.hello = nativePlatforms;
haskellPackages.hello = nativePlatforms;
};

linuxCommon = lib.recursiveUpdate gnuCommon {
Expand Down

0 comments on commit 59a733e

Please sign in to comment.