[commit: ghc] master: Support the MergeStub phase when building with dynamic-too (8dd2f98)

Ian Lynagh igloo at earth.li
Thu Jan 10 20:23:58 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/8dd2f981e43211a5c47aabe8b45e572e4f50b9fd

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

commit 8dd2f981e43211a5c47aabe8b45e572e4f50b9fd
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Jan 5 15:41:05 2013 +0000

    Support the MergeStub phase when building with dynamic-too

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

 compiler/main/DriverPipeline.hs |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 849532d..866ae8c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1457,6 +1457,12 @@ runPhase MergeStub input_fn dflags
          panic "runPhase(MergeStub): no stub"
        Just stub_o -> do
          liftIO $ joinObjectFiles dflags [input_fn, stub_o] output_fn
+         whenGeneratingDynamicToo dflags $ do
+           liftIO $ debugTraceMsg dflags 4
+                        (text "Merging stub again for -dynamic-too")
+           let dyn_input_fn  = replaceExtension input_fn  (dynObjectSuf dflags)
+               dyn_output_fn = replaceExtension output_fn (dynObjectSuf dflags)
+           liftIO $ joinObjectFiles dflags [dyn_input_fn, stub_o] dyn_output_fn
          return (StopLn, output_fn)
 
 -- warning suppression





More information about the ghc-commits mailing list