[commit: ghc] ghc-7.8: Switch on -dynamic-too with QuasiQuotes as well. (0eb804b)

git at git.haskell.org git at git.haskell.org
Thu Feb 20 12:01:15 UTC 2014


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

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/0eb804b5cec38eabc02eed2498c56575d0503977/ghc

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

commit 0eb804b5cec38eabc02eed2498c56575d0503977
Author: Austin Seipp <austin at well-typed.com>
Date:   Wed Feb 19 06:31:53 2014 -0600

    Switch on -dynamic-too with QuasiQuotes as well.
    
    As pointed out by Albert Y. C. Lai on glasgow-haskell-users.
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>
    (cherry picked from commit e75ebc487b68a07bd632b51df62d9047c559f19f)


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

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

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b5052f2..f6d9e03 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -139,11 +139,13 @@ compileOne' m_tc_result mHscMessage
        input_fnpp  = ms_hspp_file summary
        mod_graph   = hsc_mod_graph hsc_env0
        needsTH     = any (xopt Opt_TemplateHaskell . ms_hspp_opts) mod_graph
+       needsQQ     = any (xopt Opt_QuasiQuotes     . ms_hspp_opts) mod_graph
+       needsLinker = needsTH || needsQQ
        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 && not isProfWay
+   let dflags1 = if needsLinker && dynamicGhc && not isDynWay && not isProfWay
                   then gopt_set dflags0 Opt_BuildDynamicToo
                   else dflags0
 



More information about the ghc-commits mailing list