|Version 7 (modified by 4 years ago) (diff),|
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:
The CPP symbols and their corresponding command-line flags are:
Enables multithreading in the RTS, bound threads, and SMP execution.
Enables extra debugging code, assertions, traces, and the
Enables RTS tracing and event logging, see rts/Trace.c. Implied by
So for example,
libHSrts_thr_debug.a is the version of the runtime compiled with
DEBUG, and will be linked in if you use the
-debug options to GHC.
The ways that the RTS is built in are controlled by the
GhcRTSWays Makefile variable.
Other configuration options
Disabled the use of hardware registers for the stack pointer (
Sp), heap pointer (
Hp), etc. This is enabled when building "unregisterised" code, which is controlled by the
GhcUnregisterisedbuild option. Typically this is necessary when building GHC on a platform for which there is no native code generator and LLVM does not have a GHC calling convention.
Enables the use of the RTS "mini-interpreter", which simulates tail-calls. Again, this is enabled by
GhcUnregisterisedin the build system.
Controls whether the info table is placed directly before the entry code for a closure or return continuation.
This is normally turned on if the platform supports it, but is turned off by