[commit: ghc] master: Fix -dynamic-too with -boot files (a5bab46)

Ian Lynagh igloo at earth.li
Sat Mar 9 22:35:03 CET 2013


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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a5bab4680cf052ad2d84875f27b921501404ec0c

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

commit a5bab4680cf052ad2d84875f27b921501404ec0c
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Mar 9 20:49:28 2013 +0000

    Fix -dynamic-too with -boot files
    
    It was looking for Foo.dyn_hi rather than Foo.dyn_hi-boot, and so
    falling back to the slow way

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

 compiler/iface/LoadIface.lhs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs
index a81b015..0a52d66 100644
--- a/compiler/iface/LoadIface.lhs
+++ b/compiler/iface/LoadIface.lhs
@@ -560,7 +560,8 @@ findAndReadIface doc_str mod hi_boot_file
               dflags <- getDynFlags
               whenGeneratingDynamicToo dflags $ withDoDynamicToo $ do
                   let ref = canGenerateDynamicToo dflags
-                      dynFilePath = replaceExtension filePath (dynHiSuf dflags)
+                      dynFilePath = addBootSuffix_maybe hi_boot_file
+                                  $ replaceExtension filePath (dynHiSuf dflags)
                   r <- read_file dynFilePath
                   case r of
                       Succeeded (dynIface, _)





More information about the ghc-commits mailing list