Apply WERROR only to stage2 HC options
authorBen Gamari <bgamari.foss@gmail.com>
Sun, 1 Nov 2015 09:18:07 +0000 (10:18 +0100)
committerBen Gamari <ben@smart-cactus.org>
Sun, 1 Nov 2015 09:18:21 +0000 (10:18 +0100)
Otherwise validate unnecessarily may fail during the stage1 build when
booting with an older compiler.

Test Plan: Try it

Reviewers: thomie, austin

Reviewed By: thomie, austin

Differential Revision: https://phabricator.haskell.org/D1390

ghc.mk

diff --git a/ghc.mk b/ghc.mk
index bf521b2..07e1edc 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -143,7 +143,8 @@ include mk/warnings.mk
 # (Optional) build-specific configuration
 include mk/custom-settings.mk
 SRC_CC_OPTS     += $(WERROR)
-SRC_HC_OPTS     += $(WERROR)
+GhcStage2HcOpts += $(WERROR)
+GhcLibHcOpts    += $(WERROR)
 
 # -----------------------------------------------------------------------------
 # Check for inconsistent settings, after reading mk/build.mk.