[commit: ghc] master: Set the way when loading dynamic objects for GHCi (6c54727)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6c547271343be0620503f07508b109b170562af6

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

commit 6c547271343be0620503f07508b109b170562af6
Author: Ian Lynagh <[email protected]>
Date:   Fri Oct 19 18:03:37 2012 +0100

    Set the way when loading dynamic objects for GHCi
    
    This fixes using TH when building profiled libraries when
    dynamic-by-default is enabled.

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

 compiler/ghci/Linker.lhs |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs
index c3d5274..0a9de80 100644
--- a/compiler/ghci/Linker.lhs
+++ b/compiler/ghci/Linker.lhs
@@ -820,6 +820,11 @@ dynLoadObjs dflags objs = do
                       -- be calling dynLoadObjs with any objects that
                       -- need to be linked.
                       ldInputs = [],
+                      -- Even if we're e.g. profiling, we still want
+                      -- the vanilla dynamic libraries, so we set the
+                      -- ways / build tag to be just WayDyn.
+                      ways = [WayDyn],
+                      buildTag = mkBuildTag [WayDyn],
                       outputFile = Just soFile
                   }
     linkDynLib dflags2 objs []
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.