mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 12:11:28 +00:00
ghc: don't build with profiling on aarch64 #66277
This makes ghc output be lower than 2GB limit. Also enable aarch64 build parallelism now that it's fixed in GHC 8.6
This commit is contained in:
parent
9a9fcb611d
commit
1f6f0c9b3a
|
@ -30,6 +30,9 @@
|
||||||
, # Whether to build terminfo.
|
, # Whether to build terminfo.
|
||||||
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
||||||
|
|
||||||
|
# aarch64 outputs otherwise exceed 2GB limit
|
||||||
|
, enableProfiliedLibs ? !stdenv.targetPlatform.isAarch64
|
||||||
|
|
||||||
, # 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)
|
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||||
|
@ -65,6 +68,8 @@ let
|
||||||
HADDOCK_DOCS = NO
|
HADDOCK_DOCS = NO
|
||||||
BUILD_SPHINX_HTML = NO
|
BUILD_SPHINX_HTML = NO
|
||||||
BUILD_SPHINX_PDF = NO
|
BUILD_SPHINX_PDF = NO
|
||||||
|
'' + stdenv.lib.optionalString (!enableProfiliedLibs) ''
|
||||||
|
GhcLibWays = "v dyn"
|
||||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||||
GhcLibHcOpts += -fPIC
|
GhcLibHcOpts += -fPIC
|
||||||
GhcRtsHcOpts += -fPIC
|
GhcRtsHcOpts += -fPIC
|
||||||
|
|
|
@ -27,7 +27,8 @@ in
|
||||||
, doHoogle ? true
|
, doHoogle ? true
|
||||||
, doHaddockQuickjump ? doHoogle && stdenv.lib.versionAtLeast ghc.version "8.6"
|
, doHaddockQuickjump ? doHoogle && stdenv.lib.versionAtLeast ghc.version "8.6"
|
||||||
, editedCabalFile ? null
|
, editedCabalFile ? null
|
||||||
, enableLibraryProfiling ? !(ghc.isGhcjs or false)
|
# aarch64 outputs otherwise exceed 2GB limit
|
||||||
|
, enableLibraryProfiling ? !(ghc.isGhcjs or stdenv.targetPlatform.isAarch64 or false)
|
||||||
, enableExecutableProfiling ? false
|
, enableExecutableProfiling ? false
|
||||||
, profilingDetail ? "exported-functions"
|
, profilingDetail ? "exported-functions"
|
||||||
# TODO enable shared libs for cross-compiling
|
# TODO enable shared libs for cross-compiling
|
||||||
|
@ -48,8 +49,7 @@ in
|
||||||
, isExecutable ? false, isLibrary ? !isExecutable
|
, isExecutable ? false, isLibrary ? !isExecutable
|
||||||
, jailbreak ? false
|
, jailbreak ? false
|
||||||
, license
|
, license
|
||||||
# aarch64 sometimes crashes for -jn with n>1: https://ghc.haskell.org/trac/ghc/ticket/15449
|
, enableParallelBuilding ? true
|
||||||
, enableParallelBuilding ? !stdenv.buildPlatform.isAarch64
|
|
||||||
, maintainers ? []
|
, maintainers ? []
|
||||||
, doCoverage ? false
|
, doCoverage ? false
|
||||||
, doHaddock ? !(ghc.isHaLVM or false)
|
, doHaddock ? !(ghc.isHaLVM or false)
|
||||||
|
|
Loading…
Reference in a new issue