Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d4d383b880ac76d803cdd37fb031ab0c50eb9170 >--------------------------------------------------------------- commit d4d383b880ac76d803cdd37fb031ab0c50eb9170 Author: Simon Marlow <[email protected]> Date: Wed Apr 6 10:31:58 2011 +0100 Fix -split-objs: there was a bad interaction with the recent changes to the way stub files were handled. >--------------------------------------------------------------- compiler/main/DriverPipeline.hs | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 13c91c2..9bcc30a 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1178,7 +1178,9 @@ runPhase As input_fn dflags runPhase SplitAs _input_fn dflags = do - next_phase <- maybeMergeStub + -- we'll handle the stub_o file in this phase, so don't MergeStub, + -- just jump straight to StopLn afterwards. + let next_phase = StopLn output_fn <- phaseOutputFilename next_phase let base_o = dropExtension output_fn @@ -1226,8 +1228,15 @@ runPhase SplitAs _input_fn dflags io $ mapM_ assemble_file [1..n] + -- If there's a stub_o file, then we make it the n+1th split object. + PipeState{maybe_stub_o} <- getPipeState + n' <- case maybe_stub_o of + Nothing -> return n + Just stub_o -> do io $ copyFile stub_o (split_obj (n+1)) + return (n+1) + -- join them into a single .o file - io $ joinObjectFiles dflags (map split_obj [1..n]) output_fn + io $ joinObjectFiles dflags (map split_obj [1..n']) output_fn return (next_phase, output_fn) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
