forked from mirrors/nixpkgs
cabal: enable multi-threaded builds with GHC 7.8.x or later for executables
Multi-threaded builds exacerbate the non-determinism in ghc package ids, which is a serious problem for libraries. Packages that define only executables, however, should be safe to build with parallelism enabled.
This commit is contained in:
parent
1a8b7b6a12
commit
44273088ad
|
@ -217,6 +217,9 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
|
|||
${optionalString (self.enableSharedExecutables && self.stdenv.isDarwin) ''
|
||||
configureFlags+=" --ghc-option=-optl=-Wl,-headerpad_max_install_names"
|
||||
''}
|
||||
${optionalString (versionOlder "7.8" ghc.version && !self.isLibrary) ''
|
||||
configureFlags+=" --ghc-option=-j$NIX_BUILD_CORES"
|
||||
''}
|
||||
|
||||
echo "configure flags: $extraConfigureFlags $configureFlags"
|
||||
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \
|
||||
|
|
Loading…
Reference in a new issue