summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorDouglas Wilson <douglas.wilson@gmail.com>2017-06-08 15:03:44 -0400
committerBen Gamari <ben@smart-cactus.org>2017-06-08 15:35:59 -0400
commitb10d3f36250d435f9f13079dd9e3ec1ecbb0017f (patch)
tree2c8e624163fd96358b817c7378722a5695867249 /rules
parent56ef54444b89b2332abe68ee62d88792f785f5a7 (diff)
downloadhaskell-b10d3f36250d435f9f13079dd9e3ec1ecbb0017f.tar.gz
Don't pass -dcore-lint to haddock in Haddock.mk
This fixes the regressions in the haddock performance tests introduced in c9eb4385aad248118650725b7b699bb97ee21c0d. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13789 Differential Revision: https://phabricator.haskell.org/D3629
Diffstat (limited to 'rules')
-rw-r--r--rules/haddock.mk38
1 files changed, 20 insertions, 18 deletions
diff --git a/rules/haddock.mk b/rules/haddock.mk
index 3d3a83c3e2..35748c3f00 100644
--- a/rules/haddock.mk
+++ b/rules/haddock.mk
@@ -42,6 +42,9 @@ html_$1 : $$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE)
$$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEPS),$$($$n_HADDOCK_FILE) $$($$n_dist-install_$$(HADDOCK_WAY)_LIB))
+# We don't pass -dcore-lint to haddock because it caused a performance regression in #13789
+$1_$2_HADDOCK_GHC_OPTS = $$(foreach opt, $$(filter-out -dcore-lint,$$($1_$2_$$(HADDOCK_WAY)_ALL_HC_OPTS)),--optghc=$$(opt))
+
ifeq "$$(HSCOLOUR_SRCS)" "YES"
$1_$2_HADDOCK_FLAGS += --source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html\#%{NAME}
endif
@@ -56,23 +59,23 @@ ifeq "$$(HSCOLOUR_SRCS)" "YES"
"$$(ghc-cabal_INPLACE)" hscolour $1 $2
endif
"$$(TOP)/$$(INPLACE_BIN)/haddock" \
- --verbosity=0 \
- --odir="$1/$2/doc/html/$$($1_PACKAGE)" \
- --no-tmp-comp-dir \
- --dump-interface=$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) \
- --html \
- --hoogle \
- --title="$$($1_PACKAGE)-$$($1_$2_VERSION)$$(if $$(strip $$($1_$2_SYNOPSIS)),: $$(strip $$($1_$2_SYNOPSIS)),)" \
- --prologue="$1/$2/haddock-prologue.txt" \
- --optghc="-D__HADDOCK_VERSION__=$$(HADDOCK_VERSION_STRING)" \
- $$(foreach mod,$$($1_$2_HIDDEN_MODULES),--hide=$$(mod)) \
- $$(foreach pkg,$$($1_$2_DEPS),$$(if $$($$(pkg)_HADDOCK_FILE),--read-interface=../$$(pkg)$$(comma)../$$(pkg)/src/%{MODULE/./-}.html\#%{NAME}$$(comma)$$($$(pkg)_HADDOCK_FILE))) \
- $$(foreach opt,$$($1_$2_$$(HADDOCK_WAY)_ALL_HC_OPTS),--optghc=$$(opt)) \
- $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) \
- $$($1_$2_HS_SRCS) \
- $$($1_$2_EXTRA_HADDOCK_SRCS) \
- $$(EXTRA_HADDOCK_OPTS) \
- +RTS -t"$1/$2/haddock.t" --machine-readable
+ --verbosity=0 \
+ --odir="$1/$2/doc/html/$$($1_PACKAGE)" \
+ --no-tmp-comp-dir \
+ --dump-interface=$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) \
+ --html \
+ --hoogle \
+ --title="$$($1_PACKAGE)-$$($1_$2_VERSION)$$(if $$(strip $$($1_$2_SYNOPSIS)),: $$(strip $$($1_$2_SYNOPSIS)),)" \
+ --prologue="$1/$2/haddock-prologue.txt" \
+ --optghc="-D__HADDOCK_VERSION__=$$(HADDOCK_VERSION_STRING)" \
+ $$(foreach mod,$$($1_$2_HIDDEN_MODULES),--hide=$$(mod)) \
+ $$(foreach pkg,$$($1_$2_DEPS),$$(if $$($$(pkg)_HADDOCK_FILE),--read-interface=../$$(pkg)$$(comma)../$$(pkg)/src/%{MODULE/./-}.html\#%{NAME}$$(comma)$$($$(pkg)_HADDOCK_FILE))) \
+ $$($1_$2_HADDOCK_GHC_OPTS) \
+ $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) \
+ $$($1_$2_HS_SRCS) \
+ $$($1_$2_EXTRA_HADDOCK_SRCS) \
+ $$(EXTRA_HADDOCK_OPTS) \
+ +RTS -t"$1/$2/haddock.t" --machine-readable
# --no-tmp-comp-dir above is important: it saves a few minutes in a
# validate. This flag lets Haddock use the pre-compiled object files
@@ -89,4 +92,3 @@ endif # $1_$2_DO_HADDOCK
$(call profEnd, haddock($1,$2))
endef
-