summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorTravis Whitaker <pi.boy.travis@gmail.com>2020-05-06 04:14:47 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-29 13:34:48 -0400
commit67738db10010fd28a8e997b5c8f83ea591b88a0e (patch)
tree92e283a33006eca3888019c744f5d1b5ed34cddb /ghc
parentf9a513e064bd8a33ad6f8aa5fb8673931507eca1 (diff)
downloadhaskell-67738db10010fd28a8e997b5c8f83ea591b88a0e.tar.gz
Build a threaded stage 1 if the bootstrapping GHC supports it.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/ghc.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 8c112a054f..5512d50710 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -66,8 +66,15 @@ else
ghc_stage2_CONFIGURE_OPTS += -f-threaded
ghc_stage3_CONFIGURE_OPTS += -f-threaded
endif
-# Stage-0 compiler isn't guaranteed to have a threaded RTS.
+
+# If stage 0 supplies a threaded RTS, we can use it for stage 1.
+# See Note [Linking ghc-bin against threaded stage0 RTS] in
+# hadrian/src/Settings/Packages.hs for details.
+ifeq "$(GhcThreadedRts)" "YES"
+ghc_stage1_MORE_HC_OPTS += -threaded
+else
ghc_stage1_CONFIGURE_OPTS += -f-threaded
+endif
ifeq "$(GhcProfiled)" "YES"
ghc_stage2_PROGRAM_WAY = p