Commit b78182d6 authored by refold's avatar refold
Browse files

Merge pull request #1251 from 23Skidoo/failing-tests

Fix building of exes that use TH and profiling. 
parents 9a39df3b 7b592bd0
......@@ -863,7 +863,7 @@ buildExe verbosity _pkg_descr lbi
compileOpts | withProfExe lbi = profOpts
| withDynExe lbi = dynOpts
| otherwise = staticOpts
linkOpts = compileOpts `mappend` mempty {
ghcOptLinkOptions = PD.ldOptions exeBi,
ghcOptLinkLibs = extraLibs exeBi,
......@@ -880,7 +880,7 @@ buildExe verbosity _pkg_descr lbi
-- be loaded up and run by the compiler.
when ((withProfExe lbi || withDynExe lbi) &&
EnableExtension TemplateHaskell `elem` allExtensions exeBi) $
runGhcProg compileOpts { ghcOptNoLink = toFlag True }
runGhcProg staticOpts { ghcOptNoLink = toFlag True }
--TODO: do we also need to play the static vs dynamic games here?
runGhcProg compileOpts { ghcOptNoLink = toFlag True }
......
......@@ -9,7 +9,8 @@ profiling = TestCase $ do
let flags = ["--enable-library-profiling"
-- ,"--disable-library-vanilla"
,"--enable-executable-profiling"]
spec = PackageSpec ("PackageTests" </> "TemplateHaskell" </> "profiling") flags
spec = PackageSpec ("PackageTests" </>
"TemplateHaskell" </> "profiling") flags
result <- cabal_build spec
assertBuildSucceeded result
......@@ -18,6 +19,7 @@ dynamic = TestCase $ do
let flags = ["--enable-shared"
-- ,"--disable-library-vanilla"
,"--enable-executable-dynamic"]
spec = PackageSpec ("PackageTests" </> "TemplateHaskell" </> "dynamic") flags
spec = PackageSpec ("PackageTests" </>
"TemplateHaskell" </> "dynamic") flags
result <- cabal_build spec
assertBuildSucceeded result
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment