[commit: ghc] master: We need to setModLocation in the HscOut phase, not the Hsc phase (4b205b8)

Ian Lynagh igloo at earth.li
Fri Apr 26 21:42:29 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/4b205b8b86aa443e52adf46fc7de4bf9c872f228

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

commit 4b205b8b86aa443e52adf46fc7de4bf9c872f228
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri Apr 26 19:11:43 2013 +0100

    We need to setModLocation in the HscOut phase, not the Hsc phase
    
    The output location needs to be different for the vanilla and dynamic
    ways when doing -dynamic-too. Fixes dynamicToo003.

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

 compiler/main/DriverPipeline.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index bdc2e8e..57b0432 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -960,8 +960,6 @@ runPhase (RealPhase (Hsc src_flavour)) input_fn dflags0
 
         let o_file = ml_obj_file location -- The real object file
 
-        setModLocation location
-
   -- Figure out if the source has changed, for recompilation avoidance.
   --
   -- Setting source_unchanged to True means that M.o seems
@@ -1016,6 +1014,8 @@ runPhase (RealPhase (Hsc src_flavour)) input_fn dflags0
 
 runPhase (HscOut src_flavour mod_name result) _ dflags = do
         location <- getLocation src_flavour mod_name
+        setModLocation location
+
         let o_file = ml_obj_file location -- The real object file
             hsc_lang = hscTarget dflags
             next_phase = hscPostBackendPhase dflags src_flavour hsc_lang





More information about the ghc-commits mailing list