diff options
author | Austin Seipp <austin@well-typed.com> | 2014-01-13 02:52:35 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-01-14 03:46:06 -0600 |
commit | 7df27d52cffa915886b9f2860e961a0e7bb5dd1e (patch) | |
tree | be30072f1fdef66f916e94387044ac57d009054f /compiler/main/DriverPipeline.hs | |
parent | 4d5d68a87c282dc4bdac146685b2705de8fdbe3a (diff) | |
download | haskell-7df27d52cffa915886b9f2860e961a0e7bb5dd1e.tar.gz |
Fix the behavior of ae87e122 (#8180)
As Simon pointed out, we should only enable -dynamic-too in the template
haskell case if GHC is dynamic and we're not already compiling in the
dyn way (the dyn way will be switched on by -dynamic-too later in the
pipeline anyway - see pipeLoop)
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index acd231e88a..df0f8e6492 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -139,10 +139,10 @@ 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 - + isDynWay = any (== WayDyn) (ways dflags0) -- #8180 - when using TemplateHaskell, switch on -dynamic-too so -- the linker can correctly load the object files. - let dflags1 = if needsTH + let dflags1 = if needsTH && dynamicGhc && not isDynWay then gopt_set dflags0 Opt_BuildDynamicToo else dflags0 |