From 1f6f0c9b3a832f8f32ad3b53c980059ead42808c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 21 Jul 2020 17:39:12 +0200 Subject: [PATCH] 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 --- pkgs/development/compilers/ghc/8.8.3.nix | 5 +++++ pkgs/development/haskell-modules/generic-builder.nix | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.8.3.nix b/pkgs/development/compilers/ghc/8.8.3.nix index b199dc34fa37..c22327efce36 100644 --- a/pkgs/development/compilers/ghc/8.8.3.nix +++ b/pkgs/development/compilers/ghc/8.8.3.nix @@ -30,6 +30,9 @@ , # Whether to build terminfo. enableTerminfo ? !stdenv.targetPlatform.isWindows + # aarch64 outputs otherwise exceed 2GB limit +, enableProfiliedLibs ? !stdenv.targetPlatform.isAarch64 + , # 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) @@ -65,6 +68,8 @@ let HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO + '' + stdenv.lib.optionalString (!enableProfiliedLibs) '' + GhcLibWays = "v dyn" '' + stdenv.lib.optionalString enableRelocatedStaticLibs '' GhcLibHcOpts += -fPIC GhcRtsHcOpts += -fPIC diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index de5bf631bf0d..20fa2c840629 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -27,7 +27,8 @@ in , doHoogle ? true , doHaddockQuickjump ? doHoogle && stdenv.lib.versionAtLeast ghc.version "8.6" , editedCabalFile ? null -, enableLibraryProfiling ? !(ghc.isGhcjs or false) +# aarch64 outputs otherwise exceed 2GB limit +, enableLibraryProfiling ? !(ghc.isGhcjs or stdenv.targetPlatform.isAarch64 or false) , enableExecutableProfiling ? false , profilingDetail ? "exported-functions" # TODO enable shared libs for cross-compiling @@ -48,8 +49,7 @@ in , isExecutable ? false, isLibrary ? !isExecutable , jailbreak ? false , license - # aarch64 sometimes crashes for -jn with n>1: https://ghc.haskell.org/trac/ghc/ticket/15449 -, enableParallelBuilding ? !stdenv.buildPlatform.isAarch64 +, enableParallelBuilding ? true , maintainers ? [] , doCoverage ? false , doHaddock ? !(ghc.isHaLVM or false)