Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ let self =

, enableDWARF ? false

, enableIPE ? false

, enableTerminfo ? !stdenv.targetPlatform.isAndroid &&
# Terminfo does not work on older ghc cross arm and windows compilers
(!haskell-nix.haskellLib.isCrossTarget || !(stdenv.targetPlatform.isAarch32 || stdenv.targetPlatform.isAarch64 || stdenv.targetPlatform.isWindows) || builtins.compareVersions ghc-version "8.10" >= 0)
Expand All @@ -61,6 +63,10 @@ let self =
else "perf-cross-ncg"
)

, # Extra flavour transformers to pass to Hadrian. For example, +debug_ghc or
# +assertions to work on debugging the compiler.
extraFlavourTransformers ? []

, # 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/
disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64 || stdenv.targetPlatform.isAndroid
Expand Down Expand Up @@ -385,6 +391,8 @@ let
+ lib.optionalString enableDWARF "+debug_info"
+ lib.optionalString ((enableNativeBignum && hadrianHasNativeBignumFlavour) || targetPlatform.isGhcjs || targetPlatform.isWasm) "+native_bignum"
+ lib.optionalString (targetPlatform.isGhcjs || targetPlatform.isWasm) "+no_profiled_libs"
+ lib.optionalString enableIPE "+ipe"
+ lib.concatStrings extraFlavourTransformers
} --docs=no-sphinx -j --verbose"
# This is needed to prevent $GCC from emitting out of line atomics.
# Those would then result in __aarch64_ldadd1_sync and others being referenced, which
Expand Down
Loading