Fix #9243 so recompilation avoidance works with -fno-code
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Sat, 27 Dec 2014 18:50:01 +0000 (10:50 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sat, 3 Jan 2015 19:56:14 +0000 (11:56 -0800)
commit2223e196b2dc5340d70e58be011c279d381b4319
tree3c587547990df7c62d73598f9dfe991afb0b4880
parentaf4d99803ea7676f88f250ad56a8c31c1c8cd5bc
Fix #9243 so recompilation avoidance works with -fno-code

Summary:
Where we track timestamps of object files, also track timestamps
for interface files.  When -fno-code -fwrite-interface is enabled, use
the interface file timestamp as an extra check to see if the files are
up-to-date.  We had to apply this logic to one-shot and make modes.

This fix would be good to merge into 7.10; it makes using -fno-code
-fwrite-interface for flywheel type checking usable.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate and new test cases

Reviewers: austin

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D596

GHC Trac Issues: #9243
24 files changed:
compiler/main/DriverPipeline.hs
compiler/main/GhcMake.hs
compiler/main/HscTypes.hs
testsuite/.gitignore
testsuite/tests/driver/recomp001/Makefile
testsuite/tests/driver/retc001/A.hs [new file with mode: 0644]
testsuite/tests/driver/retc001/B1.hs [new file with mode: 0644]
testsuite/tests/driver/retc001/B2.hs [new file with mode: 0644]
testsuite/tests/driver/retc001/C.hs [new file with mode: 0644]
testsuite/tests/driver/retc001/Makefile [new file with mode: 0644]
testsuite/tests/driver/retc001/all.T [new file with mode: 0644]
testsuite/tests/driver/retc001/retc001.stderr [new file with mode: 0644]
testsuite/tests/driver/retc001/retc001.stdout [new file with mode: 0644]
testsuite/tests/driver/retc002/Makefile [new file with mode: 0644]
testsuite/tests/driver/retc002/Q.hs [new file with mode: 0644]
testsuite/tests/driver/retc002/W.hs [new file with mode: 0644]
testsuite/tests/driver/retc002/W.hs-boot [new file with mode: 0644]
testsuite/tests/driver/retc002/all.T [new file with mode: 0644]
testsuite/tests/driver/retc002/retc002.stderr [new file with mode: 0644]
testsuite/tests/driver/retc002/retc002.stdout [new file with mode: 0644]
testsuite/tests/driver/retc003/A.hs [new file with mode: 0644]
testsuite/tests/driver/retc003/Makefile [new file with mode: 0644]
testsuite/tests/driver/retc003/all.T [new file with mode: 0644]
testsuite/tests/driver/retc003/retc003.stdout [new file with mode: 0644]