diff options
author | archblob <fcsernik@gmail.com> | 2014-09-16 07:56:09 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-09-16 07:56:09 -0500 |
commit | 52eab67a99dd928204b730355245233fa96fa24d (patch) | |
tree | 221af20e20a4f6b605c8e97d643d5811bbf10ba3 /ghc | |
parent | fe9f7e40844802443315ef2238c4cdefda756b62 (diff) | |
download | haskell-52eab67a99dd928204b730355245233fa96fa24d.tar.gz |
Add the ability to :set -l{foo} in ghci, fix #1407.
Summary:
The dynamic linking code was already there but it was not called
on flag changes in ghci.
Test Plan: validate
Reviewers: hvr, simonmar, austin
Reviewed By: austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D194
GHC Trac Issues: #1407
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/InteractiveUI.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index ea90280b06..0bcecd3449 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -2146,6 +2146,17 @@ newDynFlags interactive_only minus_opts = do , pkgDatabase = pkgDatabase dflags2 , packageFlags = packageFlags dflags2 } + let ld0length = length $ ldInputs dflags0 + fmrk0length = length $ cmdlineFrameworks dflags0 + + newLdInputs = drop ld0length (ldInputs dflags2) + newCLFrameworks = drop fmrk0length (cmdlineFrameworks dflags2) + + when (not (null newLdInputs && null newCLFrameworks)) $ + liftIO $ linkCmdLineLibs $ + dflags2 { ldInputs = newLdInputs + , cmdlineFrameworks = newCLFrameworks } + return () |