[commit: packages/Cabal] ghc-head: Rename and rearrange some variables. (c854a53)
git at git.haskell.org
git at git.haskell.org
Mon Aug 26 23:28:28 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=c854a53bd0f675e3e31035b24e62467fc3ed6e7a
>---------------------------------------------------------------
commit c854a53bd0f675e3e31035b24e62467fc3ed6e7a
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date: Fri Jul 12 17:37:12 2013 +0200
Rename and rearrange some variables.
Based on discussion with @dcoutts.
>---------------------------------------------------------------
c854a53bd0f675e3e31035b24e62467fc3ed6e7a
Cabal/Distribution/Simple/GHC.hs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Cabal/Distribution/Simple/GHC.hs b/Cabal/Distribution/Simple/GHC.hs
index d0527c0..58766d0 100644
--- a/Cabal/Distribution/Simple/GHC.hs
+++ b/Cabal/Distribution/Simple/GHC.hs
@@ -917,9 +917,11 @@ buildExe verbosity _pkg_descr lbi
"-dynhisuf", "dyn_hi",
"-dynosuf", "dyn_o"]
}
- compileOpts | withProfExe lbi = profOpts
+ commonOpts | withProfExe lbi = profOpts
| withDynExe lbi = dynOpts
| otherwise = staticOpts
+ compileOpts | useDynToo = dynTooOpts
+ | otherwise = commonOpts
withStaticExe = (not $ withProfExe lbi) && (not $ withDynExe lbi)
-- For building exe's that use TH with -prof or -dynamic we actually have
@@ -940,7 +942,7 @@ buildExe verbosity _pkg_descr lbi
| isGhcDynamic = doingTH && (withProfExe lbi || withStaticExe)
| otherwise = doingTH && (withProfExe lbi || withDynExe lbi)
- linkOpts = compileOpts `mappend` mempty {
+ linkOpts = commonOpts `mappend` mempty {
ghcOptLinkOptions = PD.ldOptions exeBi,
ghcOptLinkLibs = extraLibs exeBi,
ghcOptLinkLibPath = extraLibDirs exeBi,
@@ -953,9 +955,7 @@ buildExe verbosity _pkg_descr lbi
when compileForTH $
runGhcProg compileTHOpts { ghcOptNoLink = toFlag True }
- let compileOpts' | useDynToo = dynTooOpts
- | otherwise = compileOpts
- in runGhcProg compileOpts' { ghcOptNoLink = toFlag True }
+ runGhcProg compileOpts { ghcOptNoLink = toFlag True }
-- build any C sources
unless (null cSrcs) $ do
More information about the ghc-commits
mailing list