-dynamic-too implementation is unnecessarily inefficient
-dynamic-too
runs the compilation starting from Core-to-STG twice. So that's two Core-to-STG, STG-to-Cmm, Cmm-to-native-code for one module. As far as I can see the code generator does not care about -dynamic-too
at all -- so in these two compilation we generate identical code. I think the only difference is in linking, so unless I'm missing something implementation of -dynamic-too
could be made much more efficient by only linking twice.