summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-02-19 06:31:53 -0600
committerAustin Seipp <austin@well-typed.com>2014-02-19 16:32:36 -0600
commite75ebc487b68a07bd632b51df62d9047c559f19f (patch)
treec45459ccedee2c988c28d0861747485bc552c586 /compiler/main
parente638acb6a825559fbd93bdaf8ae2704535c157f1 (diff)
downloadhaskell-e75ebc487b68a07bd632b51df62d9047c559f19f.tar.gz
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@well-typed.com>
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/DriverPipeline.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b5052f2d64..f6d9e03ac3 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