Never build with more than -j4 because of slowdown (#227)
Same thing happens in nixpkgs. https://gitlab.haskell.org/ghc/ghc/issues/9221
commit7cbb5f50c15feb0253ba8152b563c2139b318583
authorYorick <yorickvanpelt@gmail.com>
dateFri 16 Aug 2019, 19:30 (7 years ago)
parent1099d95
builder/comp-builder.nix+2−1
@@ -182,7 +182,8 @@ stdenv.mkDerivation ({
182182
183183 buildPhase = ''
184184 runHook preBuild
185− $SETUP_HS build -j$NIX_BUILD_CORES ${lib.concatStringsSep " " component.setupBuildFlags}
185+ # https://gitlab.haskell.org/ghc/ghc/issues/9221
186+ $SETUP_HS build -j$(($NIX_BUILD_CORES > 4 ? 4 : $NIX_BUILD_CORES)) ${lib.concatStringsSep " " component.setupBuildFlags}
186187 runHook postBuild
187188 '';
188189