#include "PosixSource.h"
#include "Rts.h"
+#include "RtsOpts.h"
#include "RtsUtils.h"
#include "Profiling.h"
char *ghc_rts = getenv("GHCRTS");
if (ghc_rts != NULL) {
- splitRtsFlags(ghc_rts, rts_argc, rts_argv);
+ if (rtsOptsEnabled) {
+ splitRtsFlags(ghc_rts, rts_argc, rts_argv);
+ }
+ else {
+ errorBelch("Warning: Ignoring GHCRTS variable");
+ // We don't actually exit, just warn
+ }
}
}
break;
}
else if (strequal("+RTS", argv[arg])) {
- mode = RTS;
+ if (rtsOptsEnabled) {
+ mode = RTS;
+ }
+ else {
+ errorBelch("RTS options are disabled");
+ stg_exit(EXIT_FAILURE);
+ }
}
else if (strequal("-RTS", argv[arg])) {
mode = PGM;