summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorPHO <pho@cielonegro.org>2022-02-08 13:08:03 +0900
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-08 10:43:19 -0500
commitbd493ed6a63e41855f90c210f6cf1bace9199cf0 (patch)
treee8d5c298c84e5b0931da11a3210373bbe93335a7 /ghc
parentb33f0cfabfcace98bb8b77a5bce6c6efba076cf6 (diff)
downloadhaskell-bd493ed6a63e41855f90c210f6cf1bace9199cf0.tar.gz
Don't try to build stage1 with -eventlog if stage0 doesn't provide it
Like -threaded, stage0 isn't guaranteed to have an event-logging RTS.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/ghc-bin.cabal.in9
-rw-r--r--ghc/ghc.mk5
2 files changed, 13 insertions, 1 deletions
diff --git a/ghc/ghc-bin.cabal.in b/ghc/ghc-bin.cabal.in
index cde0cbcb3e..3a1b4922f6 100644
--- a/ghc/ghc-bin.cabal.in
+++ b/ghc/ghc-bin.cabal.in
@@ -29,6 +29,11 @@ Flag threaded
Default: True
Manual: True
+Flag eventlog
+ Description: Link the ghc executable against the event-logging RTS
+ Default: True
+ Manual: True
+
Executable ghc
Default-Language: Haskell2010
@@ -91,7 +96,9 @@ Executable ghc
if flag(threaded)
ghc-options: -threaded
- ghc-options: -eventlog
+ -- Same for GhcEventLoggingRts
+ if flag(eventlog)
+ ghc-options: -eventlog
Other-Extensions:
CPP
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index fcfb61f65a..627f4bc13c 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -67,6 +67,11 @@ else
ghc_stage1_CONFIGURE_OPTS += -f-threaded
endif
+# Same for an event-logging RTS.
+ifeq "$(GhcEventLoggingRts)" "NO"
+ghc_stage1_CONFIGURE_OPTS += -f-eventlog
+endif
+
ifeq "$(GhcProfiled)" "YES"
ghc_stage2_PROGRAM_WAY = p
endif