Permalink
Browse files

Conditionally turn on dynamic-executable by default

If the compiler builds dynamic things by default, then so does Cabal.
  • Loading branch information...
1 parent 65fe28f commit 09f9c4742204e5e5a3c385ea058ca8350b77e27e @igfoo igfoo committed Oct 4, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 Cabal/Distribution/Simple/Configure.hs
  2. +1 −1 Cabal/Distribution/Simple/Setup.hs
@@ -532,7 +532,7 @@ configure (pkg_descr0, pbi) cfg
++ intercalate " depends on "
(map (\(_,k,_) -> "'" ++ k ++ "'") (vs ++ [head vs]))
- withSharedLibDefault <-
+ sharedLibsByDefault <-
case compilerId comp of
CompilerId GHC _ ->
case lookupProgram ghcProgram programsConfig''' of
@@ -566,8 +566,8 @@ configure (pkg_descr0, pbi) cfg
withPrograms = programsConfig''',
withVanillaLib = fromFlag $ configVanillaLib cfg,
withProfLib = fromFlag $ configProfLib cfg,
- withSharedLib = fromFlagOrDefault withSharedLibDefault $ configSharedLib cfg,
- withDynExe = fromFlag $ configDynExe cfg,
+ withSharedLib = fromFlagOrDefault sharedLibsByDefault $ configSharedLib cfg,
+ withDynExe = fromFlagOrDefault sharedLibsByDefault $ configDynExe cfg,
withProfExe = fromFlag $ configProfExe cfg,
withOptimization = fromFlag $ configOptimization cfg,
withGHCiLib = fromFlag $ configGHCiLib cfg,
@@ -305,7 +305,7 @@ defaultConfigFlags progConf = emptyConfigFlags {
configVanillaLib = Flag True,
configProfLib = Flag False,
configSharedLib = NoFlag,
- configDynExe = Flag False,
+ configDynExe = NoFlag,
configProfExe = Flag False,
configOptimization = Flag NormalOptimisation,
configProgPrefix = Flag (toPathTemplate ""),

0 comments on commit 09f9c47

Please sign in to comment.