ghc: use ncg for cross buildsystem

We can use ncg for all x86 builds.

Fixes #61262
This commit is contained in:
Matthew Bauer 2019-05-12 00:15:10 -04:00
parent 7c7ccd51f4
commit 8a52658918
4 changed files with 12 additions and 8 deletions

View File

@ -9,7 +9,7 @@
, # GHC can be built with system libffi or a bundled one. , # GHC can be built with system libffi or a bundled one.
libffi ? null 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 , # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a # non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too. # build-time dependency too.
@ -31,7 +31,8 @@
, # What flavour to build. An empty string indicates no , # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values. # 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 , # 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/ # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/

View File

@ -9,7 +9,7 @@
, # GHC can be built with system libffi or a bundled one. , # GHC can be built with system libffi or a bundled one.
libffi ? null 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 , # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a # non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too. # build-time dependency too.
@ -31,7 +31,8 @@
, # What flavour to build. An empty string indicates no , # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values. # 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 , # 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/ # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/

View File

@ -9,7 +9,7 @@
, # GHC can be built with system libffi or a bundled one. , # GHC can be built with system libffi or a bundled one.
libffi ? null 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 , # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a # non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too. # build-time dependency too.
@ -31,7 +31,8 @@
, # What flavour to build. An empty string indicates no , # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values. # 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 , # 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/ # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/

View File

@ -6,7 +6,7 @@
, libiconv ? null, ncurses , 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 , # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a # non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too. # build-time dependency too.
@ -29,7 +29,8 @@
, version ? "8.7.20190115" , version ? "8.7.20190115"
, # What flavour to build. An empty string indicates no , # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values. # 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 , # 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/ # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/