validate-settings.mk 2.42 KB
Newer Older
Simon Marlow's avatar
Simon Marlow committed
1 2
# DO NOT EDIT!  Instead, create a file mk/validate.mk, whose settings will
# override these.  See also mk/custom-settings.mk.
3

4 5
WERROR          = -Werror

6
HADDOCK_DOCS    = YES
Ian Lynagh's avatar
Ian Lynagh committed
7
SRC_CC_OPTS     += -Wall $(WERROR)
8
SRC_HC_OPTS     += -Wall $(WERROR) -H64m -O0
9

10
GhcStage1HcOpts += -O
11

12
GhcStage2HcOpts += -O
simonpj@microsoft.com's avatar
simonpj@microsoft.com committed
13 14 15 16
# Using -O (rather than -O0) here bringes my validate down from 22mins to 16 mins.
# Compiling stage2 takes longer, but we gain a faster haddock, faster
# running of the tests, and faster building of the utils to be installed

17
GhcLibHcOpts    += -O -dcore-lint
18
GhcLibWays     := $(filter v dyn,$(GhcLibWays))
19
SplitObjs       = NO
20
NoFibWays       =
21
STRIP_CMD       = :
22

23 24
CHECK_PACKAGES = YES

25 26 27 28 29 30 31
# dblatex with miktex under msys/mingw can't build the PS and PDF docs,
# and just building the HTML docs is sufficient to check that the
# markup is correct, so we turn off PS and PDF doc building when
# validating.
BUILD_DOCBOOK_PS  = NO
BUILD_DOCBOOK_PDF = NO

32
ifeq "$(ValidateHpc)" "YES"
Ian Lynagh's avatar
Ian Lynagh committed
33
GhcStage2HcOpts += -fhpc -hpcdir $(TOP)/testsuite/hpc_output/
34 35 36 37 38 39
endif
ifeq "$(ValidateSlow)" "YES"
GhcStage2HcOpts += -XGenerics -DDEBUG
GhcLibHcOpts    += -XGenerics
endif

40 41 42
######################################################################
# Disable some warnings in packages we use

43 44
# Temporarily turn off unused-do-bind warnings for the time package
libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-do-bind
45 46
# On Windows, there are also some unused import warnings
libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
47

48 49
# haskeline has warnings about deprecated use of block/unblock
libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-deprecations
50 51
libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports

52 53 54
# Temporarily turn off unused-import warnings for the binary package
libraries/binary_dist-boot_EXTRA_HC_OPTS += -fno-warn-unused-imports
libraries/binary_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
55 56 57 58 59 60 61 62 63 64 65
# binary has unusable UNPACK pragmas
libraries/binary_dist-boot_EXTRA_HC_OPTS += -Wwarn
libraries/binary_dist-install_EXTRA_HC_OPTS += -Wwarn

libraries/dph/dph-base_dist-install_EXTRA_HC_OPTS += -Wwarn
libraries/dph/dph-prim-interface_dist-install_EXTRA_HC_OPTS += -Wwarn
libraries/dph/dph-prim-seq_dist-install_EXTRA_HC_OPTS += -Wwarn
libraries/dph/dph-prim-par_dist-install_EXTRA_HC_OPTS += -Wwarn
libraries/dph/dph-seq_dist-install_EXTRA_HC_OPTS += -Wwarn
libraries/dph/dph-par_dist-install_EXTRA_HC_OPTS += -Wwarn