diff options
author | roland <rsx@bluewin.ch> | 2018-08-21 16:05:45 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-08-21 18:56:12 -0400 |
commit | dcf27e6f78529e7e471a4be64ca47398eb1b6b52 (patch) | |
tree | 227bd782b285325d034e7eb28239bc28e368a43d /rts/RtsUtils.c | |
parent | ddffa0cd8da568c97011007fc6470c61cd4447e5 (diff) | |
download | haskell-dcf27e6f78529e7e471a4be64ca47398eb1b6b52.tar.gz |
Show -with-rtsopts options in runtime's --info (#15261)
Add an additional line to the output of +RTS --info. It shows the value
of the flag -with-rtsopts provided at compile/link time.
Test Plan: make test TESTS="T15261a T15261b"
Reviewers: hvr, erikd, dfeuer, thomie, austin, bgamari, simonmar, osa1,
monoidal
Reviewed By: osa1, monoidal
Subscribers: osa1, rwbarton, carter
GHC Trac Issues: #15261
Differential Revision: https://phabricator.haskell.org/D5053
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r-- | rts/RtsUtils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c index 5357dc635e..618815de76 100644 --- a/rts/RtsUtils.c +++ b/rts/RtsUtils.c @@ -275,7 +275,7 @@ int genericRaise(int sig) { #endif } -static void mkRtsInfoPair(char *key, char *val) { +static void mkRtsInfoPair(const char *key, const char *val) { /* XXX should check for "s, \s etc in key and val */ printf(" ,(\"%s\", \"%s\")\n", key, val); } @@ -285,7 +285,7 @@ static void mkRtsInfoPair(char *key, char *val) { #define TOSTRING2(x) #x #define TOSTRING(x) TOSTRING2(x) -void printRtsInfo(void) { +void printRtsInfo(const RtsConfig rts_config) { /* The first entry is just a hack to make it easy to get the * commas right */ printf(" [(\"GHC RTS\", \"YES\")\n"); @@ -306,6 +306,8 @@ void printRtsInfo(void) { mkRtsInfoPair("Word size", TOSTRING(WORD_SIZE_IN_BITS)); mkRtsInfoPair("Compiler unregisterised", GhcUnregisterised); mkRtsInfoPair("Tables next to code", GhcEnableTablesNextToCode); + mkRtsInfoPair("Flag -with-rtsopts", /* See Trac #15261 */ + rts_config.rts_opts != NULL ? rts_config.rts_opts : ""); printf(" ]\n"); } |