Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable ghc docs by default #2319

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
13 changes: 12 additions & 1 deletion compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ let self =
, # Wheter to build in NUMA support
enableNUMA ? true

, enableDocs ? false # Choose between --docs=none and --docs=no-sphinx
# Turning this off saves around 600MB for each GHC build
# If you need GHC docs use an overlay like this:
# final: prev: {
# haskell-nix = prev.haskell-nix // {
# compiler = final.lib.mapAttrs (_: x: x.override ({
# enableDocs = true;
# })) prev.haskell-nix.compiler;
# };
# }

, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? lib.optionalString haskell-nix.haskellLib.isCrossTarget (
Expand Down Expand Up @@ -317,7 +328,7 @@ let
+ lib.optionalString enableDWARF "+debug_info"
+ lib.optionalString ((enableNativeBignum && hadrianHasNativeBignumFlavour) || targetPlatform.isGhcjs) "+native_bignum"
+ lib.optionalString targetPlatform.isGhcjs "+no_profiled_libs"
} --docs=no-sphinx -j --verbose"
} --docs=${if enableDocs then "no-sphinx" else "none"} -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
# we don't handle in the RTS properly yet. Until we figure out how to _properly_ deal
Expand Down
Loading