From: sof Date: Fri, 8 Jun 2001 20:09:43 +0000 (+0000) Subject: [project @ 2001-06-08 20:09:43 by sof] X-Git-Tag: Approximately_9120_patches~1784 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6435b43d7ba8d0c45f4c2be93928bd5e1550c989;p=ghc-hetmet.git [project @ 2001-06-08 20:09:43 by sof] When checking to see whether the .o is up-to-date, use the -o .o (if given) --- diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index d429907..39052ae 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverPipeline.hs,v 1.75 2001/06/07 11:03:07 simonmar Exp $ +-- $Id: DriverPipeline.hs,v 1.76 2001/06/08 20:09:43 sof Exp $ -- -- GHC Driver -- @@ -480,9 +480,13 @@ run_phase Hsc basename suff input_fn output_fn -- changed (which the compiler itself figures out). -- Setting source_unchanged to False tells the compiler that M.o is out of -- date wrt M.hs (or M.o doesn't exist) so we must recompile regardless. - do_recomp <- readIORef v_Recomp - todo <- readIORef v_GhcMode - let o_file = unJust "source_unchanged" (ml_obj_file location) + do_recomp <- readIORef v_Recomp + todo <- readIORef v_GhcMode + expl_o_file <- readIORef v_Output_file + let o_file = + case expl_o_file of + Nothing -> unJust "source_unchanged" (ml_obj_file location) + Just x -> x source_unchanged <- if not (do_recomp && ( todo == DoLink || todo == StopBefore Ln )) then return False