|Version 1 (modified by simonmar, 10 years ago) (diff)|
[ Up: Commentary/Rts ]
The RTS can be built in several different ways, corresponding to global CPP defines. The flavour of the RTS is chosen by GHC when compiling a Haskell program, in response to certain command-line options: -prof, -threaded, etc.
The CPP symbols and their corresponding command-line flags are:
GHC option: -prof
RTS suffix: p
Enables multithreading in the RTS, bound threads, and SMP execution.
GHC option: -threaded
RTS suffix: thr
Enables extra debugging code, assertions, traces, and the +RTS -D options.
GHC option: -debug
RTS suffix: debug
- NO_REGS, USE_MINIINTERPRETER
Enables "unregisterised" compilation, i.e. via C with no mangler.
GHC option: -unreg
RTS suffix: u
So for example, libHSRts_thr_debug.a is the version of the runtime compiled with THREADED_RTS and DEBUG, and will be linked in if you use the -threaded and -debug options to GHC.
The ways that the RTS is built in are controlled by the GhcRTSWays Makefile variable.
The following combinations are allowed:
- DEBUG with anything
- PROFILING only with NO_REGS, USE_MINIINTERPRETER
The following ways are bitrotted and currently don't work (GHC 6.6):
GHC option: -ticky
RTS suffix: t
- PAR, GRANSIM
GHC option: -par
RTS suffix: mp, mg