haskell: make generic builder follow compiler’s shared config
enableShared in generic-builder.nix should default to what the GHC compiler was compiled with. Add a passthru to all of the GHC compilers to hold the value of enableShared. If enableShared is not set in the GHC we just use false as the default value for enableSharedLibraries. Note: I may have missed some compilers. Only GHC & GHCJS are covered by this commit but this shouldn’t break evaluation of anything else.
This commit is contained in:
committed by
John Ericson
parent
17621f63eb
commit
fd7a6ea0af
@@ -30,7 +30,7 @@ in
|
||||
, profilingDetail ? "all-functions"
|
||||
# TODO enable shared libs for cross-compiling
|
||||
, enableSharedExecutables ? false
|
||||
, enableSharedLibraries ? ((ghc.isGhcjs or false) || stdenv.lib.versionOlder "7.7" ghc.version)
|
||||
, enableSharedLibraries ? (ghc.enableShared or false)
|
||||
, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin
|
||||
, enableStaticLibraries ? !hostPlatform.isWindows
|
||||
, enableHsc2hsViaAsm ? hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"
|
||||
|
||||
Reference in New Issue
Block a user