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 /ghc.mk | |
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 'ghc.mk')
-rw-r--r-- | ghc.mk | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -138,21 +138,14 @@ endif endif include mk/ways.mk -include mk/warnings.mk # (Optional) build-specific configuration include mk/custom-settings.mk -SRC_CC_OPTS += -Wall -SRC_HC_OPTS += -Wall -# Don't add -Werror to GhcStage1HcOpts, because otherwise validate may -# unnecessarily fail during the stage1 build when booting with an older -# compiler. -# It would be better to only exclude certain warnings from becoming errors -# (e.g. '-Werror -Wno-error=unused-imports -Wno-error=...'), but -Wno-error -# isn't supported yet (https://ghc.haskell.org/trac/ghc/wiki/Design/Warnings). -SRC_CC_OPTS += $(WERROR) -GhcStage2HcOpts += $(WERROR) -GhcLibHcOpts += $(WERROR) + +# The user can reset SRC_HC_OPTS from mk/build.mk. Since we try to append +# '-Wall' to it in mk/warnings.mk, we have to include mk/warnings.mk after +# mk/custom-settings.mk. +include mk/warnings.mk # ----------------------------------------------------------------------------- # Check for inconsistent settings, after reading mk/build.mk. |