summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-04-11 13:23:22 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-27 10:06:07 -0400
commitee11d04363ed8aa1d73a0cda16076a39e668d163 (patch)
tree8cb2853ac6cd99442f7ff7c4e4f979e7674301e4 /mk
parent318e0005b5a3a522854ced7162f3eee95f964bd9 (diff)
downloadhaskell-ee11d04363ed8aa1d73a0cda16076a39e668d163.tar.gz
Enable eventlog support in all ways by default
Here we deprecate the eventlogging RTS ways and instead enable eventlog support in the remaining ways. This simplifies packaging and reduces GHC compilation times (as we can eliminate two whole compilations of the RTS) while simplifying the end-user story. The trade-off is a small increase in binary sizes in the case that the user does not want eventlogging support, but we think that this is a fine trade-off. This also revealed a latent RTS bug: some files which included `Cmm.h` also assumed that it defined various macros which were in fact defined by `Config.h`, which `Cmm.h` did not include. Fixing this in turn revealed that `StgMiscClosures.cmm` failed to import various spinlock statistics counters, as evidenced by the failed unregisterised build. Closes #18948.
Diffstat (limited to 'mk')
-rw-r--r--mk/config.mk.in30
-rw-r--r--mk/ways.mk42
2 files changed, 22 insertions, 50 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index a80d47abe8..10ba35b79b 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -169,9 +169,6 @@ GhcWithSMP := $(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised
# Whether or not the bootstrapping GHC supplies a threaded RTS.
GhcThreadedRts = @GhcThreadedRts@
-# Whether or not the bootstrapping GHC supplies an event-logging RTS.
-GhcEventLoggingRts = @GhcEventLoggingRts@
-
# Whether to include GHCi in the compiler. Depends on whether the RTS linker
# has support for this OS/ARCH combination.
@@ -230,31 +227,22 @@ BuildSharedLibs=$(strip $(if $(findstring dyn,$(GhcLibWays)),YES,NO))
# make sense here:
#
# thr : threaded
-# thr_p : threaded + profiled + eventlog
-# debug : debugging + eventlog
-# thr_debug : debugging + threaded, + eventlog
-# l : eventlog
-# p : profiled + eventlog
-# thr_l : threaded + eventlog
-#
-# Note how there are a few cases which are handled specially (in packageHsLibs)
-# to reduce the number of distinct ways,
-#
-# debug implies eventlog
-# profiled implies eventlog
-#
-# This means, for instance, that there is no debug_l way.
+# thr_p : threaded + profiled
+# debug : debugging
+# thr_debug : debugging + threaded
+# p : profiled
#
-GhcRTSWays=l
+# While the eventlog used to be enabled in only a subset of ways, we now always
+# enable it.
# Usually want the debug version
-GhcRTSWays += debug
+GhcRTSWays = debug
# We always have the threaded versions, but note that SMP support may be disabled
# (see GhcWithSMP).
-GhcRTSWays += thr thr_debug thr_l
+GhcRTSWays += thr thr_debug
GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),thr_p,)
-GhcRTSWays += $(if $(findstring dyn, $(GhcLibWays)),dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn,)
+GhcRTSWays += $(if $(findstring dyn, $(GhcLibWays)),dyn debug_dyn thr_dyn thr_debug_dyn,)
GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),thr_debug_p debug_p,)
# We can only build GHCi threaded if we have a threaded RTS:
diff --git a/mk/ways.mk b/mk/ways.mk
index 4a1305e33b..53f900f80e 100644
--- a/mk/ways.mk
+++ b/mk/ways.mk
@@ -24,13 +24,12 @@
# - thr: threaded
# - debug: debugging
# - p: profiled
-# - l: eventlog
# - dyn: dynamically-linked
#
# The ways currently defined.
#
-ALL_WAYS=v l debug dyn thr thr_l p_dyn p debug_dyn thr_dyn thr_p_dyn thr_debug_dyn thr_debug debug_p thr_debug_p l_dyn thr_l_dyn thr_p
+ALL_WAYS=v debug dyn thr p_dyn p debug_dyn thr_dyn thr_p_dyn thr_debug_dyn thr_debug debug_p thr_debug_p thr_p
#
# The following ways currently are treated specially,
@@ -46,11 +45,7 @@ WAY_v_HC_OPTS= -static
# Way 'p':
WAY_p_NAME=profiling
-WAY_p_HC_OPTS= -static -prof -eventlog
-
-# Way 'l':
-WAY_l_NAME=event logging
-WAY_l_HC_OPTS= -static -eventlog
+WAY_p_HC_OPTS= -static -prof
#
# These ways apply to the RTS only:
@@ -62,31 +57,27 @@ WAY_thr_HC_OPTS= -static -optc-DTHREADED_RTS
# Way 'thr_p':
WAY_thr_p_NAME=threaded profiling
-WAY_thr_p_HC_OPTS= -static -prof -eventlog -optc-DTHREADED_RTS
-
-# Way 'thr_l':
-WAY_thr_l_NAME=threaded event logging
-WAY_thr_l_HC_OPTS= -static -optc-DTHREADED_RTS -eventlog
+WAY_thr_p_HC_OPTS= -static -prof -optc-DTHREADED_RTS
# Way 'debug':
WAY_debug_NAME=debug
-WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY -eventlog
+WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY
# Way 'debug_p':
WAY_debug_p_NAME=debug profiled
-WAY_debug_p_HC_OPTS= -static -optc-DDEBUG -prof -eventlog
+WAY_debug_p_HC_OPTS= -static -optc-DDEBUG -prof
# Way 'p':
WAY_p_NAME=profiling
-WAY_p_HC_OPTS= -static -prof -eventlog
+WAY_p_HC_OPTS= -static -prof
# Way 'thr_debug':
WAY_thr_debug_NAME=threaded debug
-WAY_thr_debug_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -eventlog
+WAY_thr_debug_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG
# Way 'thr_debug_p':
-WAY_thr_debug_p_NAME=threaded debug profiling event logging
-WAY_thr_debug_p_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -prof -eventlog
+WAY_thr_debug_p_NAME=threaded debug profiling
+WAY_thr_debug_p_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -prof
# Way 'dyn': build dynamic shared libraries
WAY_dyn_NAME=dyn
@@ -94,11 +85,11 @@ WAY_dyn_HC_OPTS=-fPIC -dynamic
# Way 'p_dyn':
WAY_p_dyn_NAME=p_dyn
-WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog
+WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof
# Way 'thr_p_dyn':
WAY_thr_p_dyn_NAME=thr_p_dyn
-WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog -optc-DTHREADED_RTS
+WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -optc-DTHREADED_RTS
# Way 'thr_dyn':
WAY_thr_dyn_NAME=thr_dyn
@@ -106,16 +97,9 @@ WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
# Way 'thr_debug_dyn':
WAY_thr_debug_dyn_NAME=thr_debug_dyn
-WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG -eventlog
+WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
# Way 'debug_dyn':
WAY_debug_dyn_NAME=debug_dyn
-WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY -eventlog
-
-# Way 'l_dyn':
-WAY_l_dyn_NAME=event logging dynamic
-WAY_l_dyn_HC_OPTS= -fPIC -dynamic -eventlog
+WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY
-# Way 'thr_l_dyn':
-WAY_thr_l_dyn_NAME=threaded event logging dynamic
-WAY_thr_l_dyn_HC_OPTS= -fPIC -dynamic -optc-DTHREADED_RTS -eventlog