diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 4b9ff94963dc..67459b146a36 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -28,6 +28,9 @@ , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform + # aarch64 outputs otherwise exceed 2GB limit +, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64 + , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt @@ -71,6 +74,8 @@ let HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO + '' + stdenv.lib.optionalString (!enableProfiledLibs) '' + GhcLibWays = "v dyn" '' + stdenv.lib.optionalString enableRelocatedStaticLibs '' GhcLibHcOpts += -fPIC GhcRtsHcOpts += -fPIC