[project @ 2004-02-25 11:34:29 by simonmar]
authorsimonmar <unknown>
Wed, 25 Feb 2004 11:34:30 +0000 (11:34 +0000)
committersimonmar <unknown>
Wed, 25 Feb 2004 11:34:30 +0000 (11:34 +0000)
Allow configuration of RTS ways by tweaking the GhcRTSWays variable.
Add default settings to config.mk.in, and add a comment to explain
which values make sense here.

Also, I disabled the debug_p way by default; it's of limited
usefulness to the average punter.

ghc/rts/Makefile
mk/config.mk.in

index 39322ba..f18e0a8 100644 (file)
@@ -31,27 +31,7 @@ HC=$(GHC_INPLACE)
 # -----------------------------------------------------------------------------
 # RTS ways
 
-WAYS=$(GhcLibWays) thr debug
-
-ifneq "$(findstring p, $(GhcLibWays))" ""
-WAYS += thr_p debug_p
-endif
-
-# Way 'thr':
-WAY_thr_NAME=threaded
-WAY_thr_HC_OPTS=-optc-DTHREADED_RTS
-
-# Way 'thr_p':
-WAY_thr_p_NAME=threaded profiled
-WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof
-
-# Way 'debug':
-WAY_debug_NAME=debug
-WAY_debug_HC_OPTS=-optc-DDEBUG
-
-# Way 'debug_p':
-WAY_debug_p_NAME=debug profiled
-WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
+WAYS=$(GhcLibWays) $(GhcRTSWays)
 
 ifneq "$(findstring debug, $(way))" ""
 GhcRtsHcOpts=
index afd2941..66732d8 100644 (file)
@@ -281,6 +281,22 @@ else
 GhcLibWays=p
 endif
 
+# In addition, the RTS is built in some further variations.  Ways that
+# make sense here:
+# 
+#   thr         : threaded
+#   thr_p       : threaded profiled
+#   debug       : debugging (compile with -g for the C compiler, and -DDEBUG)
+#   debug_p     : debugging profiled
+#   debug_thr   : debugging threaded
+#   debug_thr_p : debugging threaded profiled
+#
+ifeq "$(BootingFromHc)" "YES"
+GhcRTSWays=
+else
+GhcRTSWays=thr thr_p debug
+endif
+
 # Option flags to pass to GHC when it's compiling modules in
 # fptools/libraries.  Typically these are things like -O or
 # -dcore-lint or -H32m.  The ones that are *essential* are wired into
@@ -1040,6 +1056,26 @@ WAY_mg_NAME=GranSim
 WAY_mg_HC_OPTS=-gransim
 
 #
+# These ways apply to the RTS only:
+#
+
+# Way 'thr':
+WAY_thr_NAME=threaded
+WAY_thr_HC_OPTS=-optc-DTHREADED_RTS
+
+# Way 'thr_p':
+WAY_thr_p_NAME=threaded profiled
+WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof
+
+# Way 'debug':
+WAY_debug_NAME=debug
+WAY_debug_HC_OPTS=-optc-DDEBUG
+
+# Way 'debug_p':
+WAY_debug_p_NAME=debug profiled
+WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
+
+#
 # Add user-way configurations here:
 #
 WAY_A_NAME=