[commit: ghc] master: Switch on -dynamic-too with QuasiQuotes as well. (e75ebc4)
git at git.haskell.org
git at git.haskell.org
Wed Feb 19 22:34:39 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e75ebc487b68a07bd632b51df62d9047c559f19f/ghc
>---------------------------------------------------------------
commit e75ebc487b68a07bd632b51df62d9047c559f19f
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>
>---------------------------------------------------------------
e75ebc487b68a07bd632b51df62d9047c559f19f
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