[commit: ghc] master: Fix #8677 (fallout from #8180) (0a2d323)

git at git.haskell.org git at git.haskell.org
Tue Jan 21 20:07:11 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0a2d323cee040c6460233ff17d40199755e59959/ghc

>---------------------------------------------------------------

commit 0a2d323cee040c6460233ff17d40199755e59959
Author: Austin Seipp <austin at well-typed.com>
Date:   Tue Jan 21 14:05:49 2014 -0600

    Fix #8677 (fallout from #8180)
    
    When using TemplateHaskell and -prof, we *do not* want -dynamic-too, because
    we're going to *expect* that you compiled the vanilla/dyn way already,
    and are compiling profiling the second time (i.e. so GHCi can just load
    the normal, non-profiled object files.)
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

0a2d323cee040c6460233ff17d40199755e59959
 compiler/main/DriverPipeline.hs |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b2f182a..3d34bdb 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -140,9 +140,10 @@ compileOne' m_tc_result mHscMessage
        mod_graph   = hsc_mod_graph hsc_env0
        needsTH     = any (xopt Opt_TemplateHaskell . ms_hspp_opts) mod_graph
        isDynWay    = any (== WayDyn) (ways dflags0)
+       isProfWay   = any (== WayProf) (ways dflags0)
    -- #8180 - when using TemplateHaskell, switch on -dynamic-too so
    -- the linker can correctly load the object files.
-   let dflags1 = if needsTH && dynamicGhc && not isDynWay
+   let dflags1 = if needsTH && dynamicGhc && not isDynWay && not isProfWay
                   then gopt_set dflags0 Opt_BuildDynamicToo
                   else dflags0
 



More information about the ghc-commits mailing list