summaryrefslogtreecommitdiff
path: root/ghc/ghc-bin.cabal.in
diff options
context:
space:
mode:
authorAlp Mestanogullari <alp@well-typed.com>2018-10-01 15:14:23 +0200
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-10-01 15:14:23 +0200
commit99eb4595910f20c41734aa07a2da4db1f25512ae (patch)
tree64cfa62ef1cd81fa44fe28cb2ba815421225f3e2 /ghc/ghc-bin.cabal.in
parent139ef7e19194c8396bb857df83fdd6bbe9ff3283 (diff)
downloadhaskell-99eb4595910f20c41734aa07a2da4db1f25512ae.tar.gz
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
Diffstat (limited to 'ghc/ghc-bin.cabal.in')
-rw-r--r--ghc/ghc-bin.cabal.in12
1 files changed, 12 insertions, 0 deletions
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