diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2014-06-26 16:52:52 +0100 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2014-06-26 10:21:25 -0700 |
commit | ab105f83dcd5f9094a9edb0f0c8266fba6f3c808 (patch) | |
tree | 27c0aed5c992cc4ed021f1c82c187ef15b94600f /compiler/main/DriverPipeline.hs | |
parent | 5bbbc7d7e0ef141bff6f4c5991d154413ed86ac3 (diff) | |
download | haskell-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.hs | 4 |
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 []) |