diff options
author | Ian Lynagh <igloo@earth.li> | 2007-07-22 17:00:42 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-07-22 17:00:42 +0000 |
commit | da6ac258d7d8a8b0e03423833cdc78c57d3d39f4 (patch) | |
tree | c2fc6ae1cd1cd509b0d6954e234c7bc047f8f73e /rts | |
parent | 31cf07bc6d4aa5babc48498c6c4198b642f50390 (diff) | |
download | haskell-da6ac258d7d8a8b0e03423833cdc78c57d3d39f4.tar.gz |
Add a +RTS --info flag print various info; partially fixes trac #1517
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Makefile | 5 | ||||
-rw-r--r-- | rts/RtsFlags.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/rts/Makefile b/rts/Makefile index 2c5dcc4f4b..9ab9652b71 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -127,6 +127,11 @@ endif # SRC_HC_OPTS += -fPIC RtsMessages_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\" +RtsFlags_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\" +RtsFlags_CC_OPTS += -DRtsWay=\"rts$(_way)\" +RtsFlags_CC_OPTS += -DHostPlatform=\"$(HOSTPLATFORM)\" +RtsFlags_CC_OPTS += -DBuildPlatform=\"$(BUILDPLATFORM)\" +RtsFlags_CC_OPTS += -DTargetPlatform=\"$(TARGETPLATFORM)\" ifeq "$(way)" "mp" SRC_HC_OPTS += -I$$PVM_ROOT/include diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 639a915bcf..1e8654ddd8 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -682,6 +682,16 @@ error = rtsTrue; &rts_argv[arg][2])) { RtsFlags.MiscFlags.install_signal_handlers = rtsFalse; } + else if (strequal("info", + &rts_argv[arg][2])) { + printf("RTS info:\n"); + printf("RTS from GHC " ProjectVersion "\n"); + printf("RTS way " RtsWay "\n"); + printf("Host platform " HostPlatform "\n"); + printf("Build platform " BuildPlatform "\n"); + printf("Target platform " TargetPlatform "\n"); + exit(0); + } else { errorBelch("unknown RTS option: %s",rts_argv[arg]); error = rtsTrue; |