Hadrian: profiling and debug enabled ways support -eventlog too
Previously, the following wouldn't work:
$ cat foo.hs
main = putStrLn "hello"
$ _build/stage1/bin/ghc -prof foo.hs -o foo && ./foo +RTS -p -l
Specifically, the RTS would complain about the -l
flag. Trying to run ./foo
with +RTS -l
would complain that this required building the program with -eventlog
or -debug
. That's not the case with GHCs built with Make.
This patch emits -eventlog
more often, when the way contains one of the following "way units": logging, debug or profiling. I'm planning to make a "proper" fix that makes the RTS itself aware of the -prof => -eventlog
implication, just like it does for -debug => -eventlog
, but that will be for another MR.