X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=c6a2ee292a0f2d57a464410e58b4fd1992f048fb;hb=aafdba3bce91afb003f5f50e001e141744837bae;hp=c0595f9ffb3326f5a614bf6423763a911dfedb74;hpb=b9f6e4bbf09f7bc003fc1ea3cc5800609b2f99d0;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index c0595f9..c6a2ee2 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -243,7 +243,7 @@ compileStub dflags mod location = do stub_o = o_base ++ "_stub" `joinFileExt` o_ext -- compile the _stub.c file w/ gcc - let (stub_c,_) = mkStubPaths dflags (moduleName mod) location + let (stub_c,_,_) = mkStubPaths dflags (moduleName mod) location runPipeline StopLn dflags (stub_c,Nothing) Nothing (SpecificFile stub_o) Nothing{-no ModLocation-} @@ -304,10 +304,13 @@ link LinkBinary dflags batch_attempt_linking hpt -- modification times on all of the objects, then omit linking -- (unless the -no-recomp flag was given). e_exe_time <- IO.try $ getModificationTime exe_file - let linking_needed + extra_ld_inputs <- readIORef v_Ld_inputs + extra_times <- mapM (IO.try . getModificationTime) extra_ld_inputs + let other_times = map linkableTime linkables + ++ [ t' | Right t' <- extra_times ] + linking_needed | Left _ <- e_exe_time = True - | Right t <- e_exe_time = - any (t <) (map linkableTime linkables) + | Right t <- e_exe_time = any (t <) other_times if not (dopt Opt_ForceRecomp dflags) && not linking_needed then do debugTraceMsg dflags 2 (text exe_file <+> ptext SLIT("is up to date, linking not required.")) @@ -641,7 +644,7 @@ runPhase (Hsc src_flavour) stop dflags0 basename suff input_fn get_output_fn _ma = do -- normal Hsc mode, not mkdependHS -- we add the current directory (i.e. the directory in which - -- the .hs files resides) to the import path, since this is + -- the .hs files resides) to the include path, since this is -- what gcc does, and it's probably what you want. let current_dir = directoryOf basename