do something about cl 'optimizing' out inline singleton registration voodoo
GCC and Clang/LLVM behave in a sane manner, but the stupid cl seems to 'optimize' out the damn registrations for all the damn PDUs and such.
It seems necessary to do something about it. Maybe there's a compiler option to make it behave.
#1 Updated by Tony Ciavarella about 6 years ago
It seems like link is throwing out the symbols due to unreferenced COMDAT elimination as described on MSDN. The simple answer is to pass /OPT:NOREF to the linker, but that won't help with singleton registrations in user code and requiring such a linker option in user code seems unwise.