From 99eb4595910f20c41734aa07a2da4db1f25512ae Mon Sep 17 00:00:00 2001 From: Alp Mestanogullari Date: Mon, 1 Oct 2018 15:14:23 +0200 Subject: ghc-bin.cabal.in: add a 'threaded' flag for hadrian Summary: hadrian will explicitly enable this flag, but more importantly needs it as otherwise we just never end up passing -threaded to GHC when building a new GHC binary. We could quite likely unconditionally pass -threaded, as the corresponding logic for GhcThreaded in mk/config.mk.in seems to always lead to it being set to True, but we instead leave a way out for anyone in need of a GHC linked against a non-threaded runtime system in the future. Test Plan: T8242 (with a GHC built by hadrian) Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5146 --- ghc/ghc-bin.cabal.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ghc') diff --git a/ghc/ghc-bin.cabal.in b/ghc/ghc-bin.cabal.in index 5c51058d81..1f15c347ed 100644 --- a/ghc/ghc-bin.cabal.in +++ b/ghc/ghc-bin.cabal.in @@ -24,6 +24,11 @@ Flag ghci Default: False Manual: True +Flag threaded + Description: Link the ghc executable against the threaded RTS + Default: True + Manual: True + Executable ghc Default-Language: Haskell2010 @@ -80,6 +85,13 @@ Executable ghc UnboxedTuples ViewPatterns + -- The flag being True by default, this reflects the + -- mk/config.mk.in logic for GhcThreaded (which ends up + -- always being True as well). One can still opt out by + -- disabling this flag. + if flag(threaded) + ghc-options: -threaded + Other-Extensions: CPP NondecreasingIndentation -- cgit v1.2.1