Skip to content

Commit

Permalink
haskell.compiler.*: don't build profiled libs when host == riscv64
Browse files Browse the repository at this point in the history
Curiously when building a cross compiled riscv64 GHC, the libraries (for
the target) turn out way bigger than when building a riscv64 cross
compiler. Profiling libraries are not necessary for bootstrapping GHC,
so we can disable them for now. We may want to revisit this condition,
though, once we have a native bootstrapping path for riscv64-linux set
up.
  • Loading branch information
sternenseemann committed Oct 5, 2024
1 parent edd71fd commit 804e7c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pkgs/development/compilers/ghc/8.10.7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform

, enableProfiledLibs ? true
# Exceeds Hydra output limit (at the time of writing ~3GB) when cross compiled to riscv64.
# A riscv64 cross-compiler fits into the limit comfortably.
, enableProfiledLibs ? !stdenv.hostPlatform.isRiscV64

, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/compilers/ghc/common-hadrian.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform

, enableProfiledLibs ? true
# Exceeds Hydra output limit (at the time of writing ~3GB) when cross compiled to riscv64.
# A riscv64 cross-compiler fits into the limit comfortably.
, enableProfiledLibs ? !stdenv.hostPlatform.isRiscV64

, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/compilers/ghc/common-make-native-bignum.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform

, enableProfiledLibs ? true
# Exceeds Hydra output limit (at the time of writing ~3GB) when cross compiled to riscv64.
# A riscv64 cross-compiler fits into the limit comfortably.
, enableProfiledLibs ? !stdenv.hostPlatform.isRiscV64

, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
Expand Down

0 comments on commit 804e7c5

Please sign in to comment.