diff options
author | Simon Marlow <marlowsd@gmail.com> | 2015-11-07 09:39:05 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2015-11-07 09:39:05 +0000 |
commit | ce1f1607ed7f8fedd2f63c8610cafefd59baaf32 (patch) | |
tree | 718641160c3d93a2ca974deec1e228cb09e1a97e /testsuite/tests/plugins | |
parent | a58eeb7febd67c93dab82de7049ef1dcdecd34e9 (diff) | |
download | haskell-ce1f1607ed7f8fedd2f63c8610cafefd59baaf32.tar.gz |
Make GHCi & TH work when the compiler is built with -prof
Summary:
Amazingly, there were zero changes to the byte code generator and very
few changes to the interpreter - mainly because we've used good
abstractions that hide the differences between profiling and
non-profiling. So that bit was pleasantly straightforward, but there
were a pile of other wibbles to get the whole test suite through.
Note that a compiler built with -prof is now like one built with
-dynamic, in that to use TH you have to build the code the same way.
For dynamic, we automatically enable -dynamic-too when TH is required,
but we don't have anything equivalent for profiling, so you have to
explicitly use -prof when building code that uses TH with a profiled
compiler. For this reason Cabal won't work with TH. We don't expect
to ship a profiled compiler, so I think that's OK.
Test Plan: validate with GhcProfiled=YES in validate.mk
Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang
Reviewed By: ezyang
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1407
GHC Trac Issues: #4837, #545
Diffstat (limited to 'testsuite/tests/plugins')
-rw-r--r-- | testsuite/tests/plugins/annotation-plugin/Makefile | 2 | ||||
-rw-r--r-- | testsuite/tests/plugins/rule-defining-plugin/Makefile | 2 | ||||
-rw-r--r-- | testsuite/tests/plugins/simple-plugin/Makefile | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/plugins/annotation-plugin/Makefile b/testsuite/tests/plugins/annotation-plugin/Makefile index 7d957d0e95..ad54f75b6f 100644 --- a/testsuite/tests/plugins/annotation-plugin/Makefile +++ b/testsuite/tests/plugins/annotation-plugin/Makefile @@ -13,6 +13,6 @@ package.%: mkdir pkg.$* "$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs "$(GHC_PKG)" init pkg.$*/local.package.conf - pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf + pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" $(if $(findstring _p,$(GhcRTSWays)), --enable-library-profiling) --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf pkg.$*/setup build --distdir pkg.$*/dist -v0 pkg.$*/setup install --distdir pkg.$*/dist -v0 diff --git a/testsuite/tests/plugins/rule-defining-plugin/Makefile b/testsuite/tests/plugins/rule-defining-plugin/Makefile index 7d957d0e95..a78ba1ddc8 100644 --- a/testsuite/tests/plugins/rule-defining-plugin/Makefile +++ b/testsuite/tests/plugins/rule-defining-plugin/Makefile @@ -13,6 +13,6 @@ package.%: mkdir pkg.$* "$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs "$(GHC_PKG)" init pkg.$*/local.package.conf - pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf + pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf $(if $(findstring _p,$(GhcRTSWays)), --enable-library-profiling) pkg.$*/setup build --distdir pkg.$*/dist -v0 pkg.$*/setup install --distdir pkg.$*/dist -v0 diff --git a/testsuite/tests/plugins/simple-plugin/Makefile b/testsuite/tests/plugins/simple-plugin/Makefile index eb7cc6ab1d..ed51533379 100644 --- a/testsuite/tests/plugins/simple-plugin/Makefile +++ b/testsuite/tests/plugins/simple-plugin/Makefile @@ -15,6 +15,6 @@ package.%: "$(GHC_PKG)" init pkg.$*/local.package.conf - pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf + pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf $(if $(findstring _p,$(GhcRTSWays)), --enable-library-profiling) pkg.$*/setup build --distdir pkg.$*/dist -v0 pkg.$*/setup install --distdir pkg.$*/dist -v0 |