X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsUtils.c;h=c730d7aec4e97b82810b55ebc02cc746effcbb90;hb=0d88de0b114a391712bc117d42928b49fba4d66a;hp=94c357e5ba6aa7ed347d3a0fe97893d9aeb0c6d5;hpb=cbeb99efd4a117de5b028341dc41bc8f50717383;p=ghc-hetmet.git diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c index 94c357e..c730d7a 100644 --- a/rts/RtsUtils.c +++ b/rts/RtsUtils.c @@ -460,3 +460,23 @@ int genericRaise(int sig) { return raise(sig); #endif } + +static void mkRtsInfoPair(char *key, char *val) { + /* XXX should check for "s, \s etc in key and val */ + printf(" ,(\"%s\", \"%s\")\n", key, val); +} + +void printRtsInfo(void) { + /* The first entry is just a hack to make it easy to get the + * commas right */ + printf(" [(\"GHC RTS\", \"Yes\")\n"); + mkRtsInfoPair("GHC version", ProjectVersion); + mkRtsInfoPair("RTS way", RtsWay); + mkRtsInfoPair("Host platform", HostPlatform); + mkRtsInfoPair("Build platform", BuildPlatform); + mkRtsInfoPair("Target platform", TargetPlatform); + mkRtsInfoPair("Compiler unregisterised", GhcUnregisterised); + mkRtsInfoPair("Tables next to code", GhcEnableTablesNextToCode); + printf(" ]\n"); +} +