add performbuild flag for dynamic executables

This commit is contained in:
Tim Dysinger 2015-03-11 14:34:53 -10:00 committed by Chris Done
parent a30a429774
commit 4b651e8865
3 changed files with 4 additions and 0 deletions

View File

@ -206,6 +206,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild
, pbEnableTests = bfEnableTests buildFlags
, pbEnableHaddock = bfEnableHaddock buildFlags
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
, pbEnableExecDyn = bfEnableExecDyn buildFlags
, pbVerbose = bfVerbose buildFlags
, pbAllowNewer = bfSkipCheck buildFlags
}

View File

@ -51,6 +51,7 @@ getPerformBuild plan InstallFlags{..} =
, pbEnableTests = ifEnableTests
, pbEnableHaddock = ifEnableHaddock
, pbEnableLibProfiling = ifEnableLibProfiling
, pbEnableExecDyn = ifEnableExecDyn
, pbVerbose = ifVerbose
, pbAllowNewer = ifSkipCheck
}

View File

@ -64,6 +64,7 @@ data PerformBuild = PerformBuild
, pbEnableTests :: Bool
, pbEnableHaddock :: Bool
, pbEnableLibProfiling :: Bool
, pbEnableExecDyn :: Bool
, pbVerbose :: Bool
, pbAllowNewer :: Bool
-- ^ Pass --allow-newer to cabal configure
@ -317,6 +318,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
tell' $ "--flags=" ++ flags
when (pbEnableLibProfiling && pcEnableLibProfile) $
tell' "--enable-library-profiling"
when pbEnableExecDyn $ tell' "--enable-executable-dynamic"
where
tell' x = tell (x:)