Skip to content

Commit 94c8675

Browse files
committed
Merge branch 'master' of github.com:input-output-hk/haskell.nix into circuithub
2 parents d9cc459 + b0bbddc commit 94c8675

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

compiler/ghc/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ let
9494
inherit (bootPkgs) ghc;
9595

9696
ghcHasNativeBignum = builtins.compareVersions ghc-version "9.0" >= 0;
97+
hadrianHasNativeBignumFlavour = builtins.compareVersions ghc-version "9.6" >= 0;
9798

9899
bignumSpec =
99100
assert ghcHasNativeBignum -> !enableIntegerSimple;
@@ -280,7 +281,7 @@ let
280281
+ lib.optionalString (!enableShared) "+no_dynamic_ghc"
281282
+ lib.optionalString useLLVM "+llvm"
282283
+ lib.optionalString enableDWARF "+debug_info"
283-
+ lib.optionalString (enableNativeBignum || targetPlatform.isGhcjs) "+native_bignum"
284+
+ lib.optionalString ((enableNativeBignum && hadrianHasNativeBignumFlavour) || targetPlatform.isGhcjs) "+native_bignum"
284285
+ lib.optionalString targetPlatform.isGhcjs "+no_profiled_libs"
285286
} --docs=no-sphinx -j --verbose"
286287
# This is needed to prevent $GCC from emitting out of line atomics.
@@ -295,6 +296,9 @@ let
295296
# The following is required if we build on aarch64-darwin for aarch64-iOS. Otherwise older
296297
# iPhones/iPads/... won't understand the compiled code, as the compiler will emit LDSETALH
297298
# + lib.optionalString (targetPlatform.???) "'*.rts.ghc.c.opts += -optc-mcpu=apple-a7 -optc-march=armv8-a+norcpc'"
299+
# For GHC versions in the 9.x range that don't support the +native_bignum flavour transformer yet
300+
+ lib.optionalString ((enableNativeBignum && !hadrianHasNativeBignumFlavour))
301+
" --bignum=native"
298302
;
299303

300304
# When installation is done by copying the stage1 output the directory layout

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)