haskell: disable parallel compilation for libraries to mitigate the effects of GHC's non-deterministic library ID bug

Further details can be found at <https://github.com/peti/ghc-library-id-bug>
and <https://ghc.haskell.org/trac/ghc/ticket/4012>.
This commit is contained in:
Peter Simons 2015-06-05 23:55:01 +02:00
parent fbcdb66264
commit 7e04b7319c

View file

@ -72,7 +72,10 @@ let
hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling);
enableParallelBuilding = versionOlder "7.10" ghc.version || (versionOlder "7.8" ghc.version && !hasActiveLibrary);
# We cannot enable -j<n> parallelism for libraries because GHC is far more
# likely to generate a non-determistic library ID in that case. Further
# details are at <https://github.com/peti/ghc-library-id-bug>.
enableParallelBuilding = versionOlder "7.8" ghc.version && !hasActiveLibrary;
defaultConfigureFlags = [
"--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$pkgid"