diff options
author | Simon Marlow <marlowsd@gmail.com> | 2017-03-15 09:28:10 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-15 13:36:59 -0400 |
commit | a7be163196f452530b61cbb526631db946d20e8b (patch) | |
tree | 3dca75311a0de017f978be0ee0a682573f6d016f /rules/build-package-data.mk | |
parent | 899fb8808da875ef191da367de4ff35d079124e1 (diff) | |
download | haskell-a7be163196f452530b61cbb526631db946d20e8b.tar.gz |
Always build GHCi libs
Since the introduction of -split-sections, using GHCi with the RTS
linker is really slow:
```
$ time (echo :quit | ./inplace/bin/ghc-stage2 --interactive -fexternal-interpreter)
GHCi, version 8.1.20170304: http://www.haskell.org/ghc/ :? for help
Prelude> Leaving GHCi.
real 0m3.793s
```
(when we use `-fexternal-interpreter` it uses the RTS linker by default,
you can make it use the system linker by adding `-dynamic`)
Building the GHCi libs doesn't take much time or space in the GHC build,
but makes things much quicker for people using the RTS linker:
```
$ time (echo :quit | ./inplace/bin/ghc-stage2 --interactive -fexternal-interpreter)
GHCi, version 8.1.20170304: http://www.haskell.org/ghc/ :? for help
Prelude> Leaving GHCi.
real 0m0.285s
```
So I propose that we build and ship them unconditionally.
Test Plan: validate, perf tests above
Reviewers: bgamari, austin, niteria, erikd, Phyx
Reviewed By: bgamari
Subscribers: rwbarton, thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3298
Diffstat (limited to 'rules/build-package-data.mk')
-rw-r--r-- | rules/build-package-data.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk index 8f3a8e7c71..a20afbca3f 100644 --- a/rules/build-package-data.mk +++ b/rules/build-package-data.mk @@ -32,11 +32,13 @@ endif $1_$2_CONFIGURE_OPTS += --disable-library-for-ghci ifeq "$$(filter v,$$($1_$2_WAYS))" "v" $1_$2_CONFIGURE_OPTS += --enable-library-vanilla +# Build the GHCi lib even if GHCi is dynamic (and therefore won't use +# these by default), because they will be used by +# (a) ghci -fexternal-interpreter +# (b) statically-linked binaries that use the GHC package ifeq "$$(GhcWithInterpreter)" "YES" -ifneq "$$(DYNAMIC_GHC_PROGRAMS)" "YES" $1_$2_CONFIGURE_OPTS += --enable-library-for-ghci endif -endif else $1_$2_CONFIGURE_OPTS += --disable-library-vanilla endif |