Opened 4 years ago

Last modified 4 years ago

#10966 new bug

dirtiness checking isn't keeping track of which source file contained Main

Reported by: gueux Owned by:
Priority: normal Milestone:
Component: Driver Version: 7.10.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #10161 Differential Rev(s):
Wiki Page:

Attachments (2)

Devel.hs (36 bytes) - added by thomie 4 years ago.
Main.hs (40 bytes) - added by thomie 4 years ago.

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by thomie

Attachment: Devel.hs added

Changed 4 years ago by thomie

Attachment: Main.hs added

comment:1 Changed 4 years ago by thomie

To reproduce:

$ ghc Devel.hs -o foo

$ ./foo   # prints: "dev". Ok.

$ ghc Main.hs -o foo

$ ./foo   # prints: "not dev". Ok.

$ ghc Devel.hs -o foo

$ ./foo   # prints: "not dev". Should print "dev" (this is the bug).

comment:2 Changed 4 years ago by thomie

Component: CompilerDriver

comment:3 Changed 4 years ago by thomie

In compiler/main/DriverPipeline.hs:

linkingNeeded :: DynFlags -> Bool -> [Linkable] -> [UnitId] -> IO Bool
linkingNeeded dflags staticLink linkables pkg_deps = do
         -- if the modification time on the executable is later than the
         -- modification times on all of the objects and libraries, then omit
         -- linking (unless the -fforce-recomp flag was given).
...

comment:4 Changed 4 years ago by thomie

See also #10161.

Note: See TracTickets for help on using tickets.