diff options
author | David Feuer <david.feuer@gmail.com> | 2017-12-11 13:03:52 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-12-11 13:03:53 -0500 |
commit | 708ed9ca4dbf372817fe84a2fe486940123bddfb (patch) | |
tree | 30d67b789552b9f017674d4e9f2b6341cc75eede /testsuite/tests/driver/Makefile | |
parent | cafe98345cb5d4b11f2059d60d2f20e976ef4f2a (diff) | |
download | haskell-708ed9ca4dbf372817fe84a2fe486940123bddfb.tar.gz |
Allow users to ignore optimization changes
* Add a new flag, `-fignore-optim-changes`, allowing them to avoid
recompilation if the only changes are to the `-O` level or to
flags controlling optimizations.
* When `-fignore-optim-changes` is *off*, recompile when optimization
flags (e.g., `-fno-full-laziness`) change. Previously, we ignored
these unconditionally when deciding whether to recompile a module.
Reviewers: austin, bgamari, simonmar
Reviewed By: simonmar
Subscribers: duog, carter, simonmar, rwbarton, thomie
GHC Trac Issues: #13604
Differential Revision: https://phabricator.haskell.org/D4123
Diffstat (limited to 'testsuite/tests/driver/Makefile')
-rw-r--r-- | testsuite/tests/driver/Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index ffb924adb5..727cc44940 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -637,6 +637,20 @@ T10923: # should NOT output "compilation is NOT required" "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O -c T10923.hs +.PHONY: T13604 +T13604: + $(RM) -rf T13604.o T13604.hi + "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O0 -c T13604.hs + # SHOULD output "compilation is NOT required" + "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O -c -fignore-optim-changes T13604.hs + +.PHONY: T13604a +T13604a: + $(RM) -rf T13604a.o T13604a.hi + "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O0 -c -fhpc T13604a.hs + # SHOULD output "compilation is NOT required" + "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O0 -c -fignore-hpc-changes T13604a.hs + .PHONY: T12955 T12955: ! "$(TEST_HC)" $(TEST_HC_OPTS) --make T12955 |