projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use GHC.Exts rather than GHC.Prim
[ghc-hetmet.git]
/
compiler
/
main
/
DriverPipeline.hs
diff --git
a/compiler/main/DriverPipeline.hs
b/compiler/main/DriverPipeline.hs
index
c0595f9
..
c6a2ee2
100644
(file)
--- 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
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-}
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
-- 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
| 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."))
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
= 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
-- what gcc does, and it's probably what you want.
let current_dir = directoryOf basename