diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-11-30 12:35:58 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-01 10:52:11 +0100 |
commit | 14d0f7f1221db758cd06a69f53803d9d0150164a (patch) | |
tree | 0df6ccac45cffee6ceaa86f275be1b3ed2d4f6a6 /rules | |
parent | afb721390cd506f09ce9f04aa3fb19324c2ae5a0 (diff) | |
download | haskell-14d0f7f1221db758cd06a69f53803d9d0150164a.tar.gz |
Build system: Add stage specific SRC_HC_(WARNING_)OPTS
* Add stage specific versions of SRC_HC_OPTS. These are currently only
used for -Werror. The previous combination of GhcStage2HcOpts and
GhcLibHcOpts didn't apply to utils/*.
* Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be
used for new warning supression flags that should not be passed to the
bootstrap compiler.
* Move -Wall (and -Werror) related code back to mk/warnings.mk, where it
was before 987d54274. Now all warning related code is nicely together.
Include mk/warnings.mk after mk/custom-settings.mk to make this work.
Reviewed By: bgamari, hvr
Differential Revision: https://phabricator.haskell.org/D1536
Diffstat (limited to 'rules')
-rw-r--r-- | rules/distdir-way-opts.mk | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk index 47f6f90237..92dbf346ff 100644 --- a/rules/distdir-way-opts.mk +++ b/rules/distdir-way-opts.mk @@ -19,7 +19,9 @@ define distdir-way-opts # args: $1 = dir, $2 = distdir, $3 = way, $4 = stage # $1 is the directory we're building in # $2 is the distdir (e.g. "dist", "dist-install" etc.) # $3 is the way (e.g. "v", "p", etc.) -# $4 is the stage ("1", "2", "3") +# $4 is the stage ("0", "1", "2") that the options are passed to +# See Note [Stage number in build variables] +# in mk/config.mk.in. # # ----------------------------- # The variables affecting Haskell compilations are as follows, including @@ -40,10 +42,22 @@ define distdir-way-opts # args: $1 = dir, $2 = distdir, $3 = way, $4 = stage # SRC_HC_OPTS source-tree-wide GHC options mk/config.mk.in # mk/build.mk # mk/validate.mk -# +# mk/warnings.mk +# +# SRC_HC_OPTS_STAGE$4 source-tree-wide GHC options, mk/config.mk.in +# supplied to the stage $4 mk/build.mk +# compiler only mk/validate.mk +# mk/warnings.mk +# # SRC_HC_WARNING_OPTS source-tree-wide GHC warning mk/config.mk.in # options mk/build.mk # mk/validate.mk +# mk/warnings.mk +# +# SRC_HC_WARNING_OPTS_STAGE$4 mk/config.mk.in +# source-tree-wide GHC warning mk/build.mk +# options, supplied to the mk/validate.mk +# stage $4 compiler only mk/warnings.mk # # EXTRA_HC_OPTS for supplying extra options on make EXTRA_HC_OPTS=... # the command line @@ -60,6 +74,7 @@ define distdir-way-opts # args: $1 = dir, $2 = distdir, $3 = way, $4 = stage # $1_$2_MORE_HC_OPTS GHC options for this dir/distdir ??? # # $1_$2_EXTRA_HC_OPTS GHC options for this dir/distdir mk/build.mk +# mk/warnings.mk # # $1_$2_HC_PKGCONF -package-db flag if necessary rules/package-config.mk # @@ -100,6 +115,7 @@ $1_$2_$3_MOST_HC_OPTS = \ $$(WAY_$3_HC_OPTS) \ $$(CONF_HC_OPTS) \ $$(SRC_HC_OPTS) \ + $$(SRC_HC_OPTS_STAGE$4) \ $$($1_HC_OPTS) \ $$($1_$2_HC_PKGCONF) \ $$(if $$($1_$2_PROG),, \ @@ -121,6 +137,7 @@ $1_$2_$3_MOST_HC_OPTS = \ $$($1_$2_$3_HC_OPTS) \ $$($$(basename $$(subst ./,,$$<))_HC_OPTS) \ $$(SRC_HC_WARNING_OPTS) \ + $$(SRC_HC_WARNING_OPTS_STAGE$4) \ $$(EXTRA_HC_OPTS) $1_$2_$3_MOST_DIR_HC_OPTS = \ |