summaryrefslogtreecommitdiff
path: root/compiler/main/DriverPipeline.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2014-06-26 16:52:52 +0100
committerEdward Z. Yang <ezyang@cs.stanford.edu>2014-06-26 10:21:25 -0700
commitab105f83dcd5f9094a9edb0f0c8266fba6f3c808 (patch)
tree27c0aed5c992cc4ed021f1c82c187ef15b94600f /compiler/main/DriverPipeline.hs
parent5bbbc7d7e0ef141bff6f4c5991d154413ed86ac3 (diff)
downloadhaskell-ab105f83dcd5f9094a9edb0f0c8266fba6f3c808.tar.gz
Add new flag -fwrite-interface for -fno-code.
Summary: Normally, -fno-code does not generate interface files. However, if you want to use it to type check over multiple runs of GHC, you will need the interface files to check source files further down the dependency chain; -fwrite-interface does this for you. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: clean validate, and a new test-case Reviewers: simonpj Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D27
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r--compiler/main/DriverPipeline.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 0eae3bbb21..11427e27cf 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -228,7 +228,9 @@ compileOne' m_tc_result mHscMessage
hm_iface = iface,
hm_linkable = Just linkable })
HscNothing ->
- do (iface, _changed, details) <- hscSimpleIface hsc_env tc_result mb_old_hash
+ do (iface, changed, details) <- hscSimpleIface hsc_env tc_result mb_old_hash
+ when (gopt Opt_WriteInterface dflags) $
+ hscWriteIface dflags iface changed summary
let linkable = if isHsBoot src_flavour
then maybe_old_linkable
else Just (LM (ms_hs_date summary) this_mod [])