The fiddling around in the Cmm parser is kind of annoying, and the fact that you can't do anything with the warning messages without having a DynFlags is also a bit of a wart. But I guess I'm not strongly opposed to this. Ultimately I think we should split out the Settings from DynFlags, but this is OK in the meantime.
Just fix the ghc.cabal.in before committing, and ensure it validates.
A doc comment somewhere in this module explaining the motivation for its introduce and where it is used would be nice.
Perhaps make this a haddock comment?