Interesting, thanks for the explanation. However, `i686-w64-mingw32-clang -mcmodel=small` still emits the refptr symbols, at least on Clang 15.
I don't know, maybe that's something to be compatible with MinGW auto export, or maybe that's just a bug in llvm-mingw, I'm not sure it needs them and I don't think GCC generates them for i386. I'm not usually using it.
Interesting, I actually had no idea MinGW defaulted to -mcmodel=medium. How do you even get auto-exported symbols in PE with MinGW? I never knew that was a thing.
I believe it's automatically enabled unless you have specified a .def
Fwiw when using MinGW runtime you still get plenty of .refptr indirections pulled from their pre-built objects, because the runtime has to support it by default. Proton also builds MinGW runtime with -mcmodel=small to avoid that, which then breaks the auto-export feature but we don't need it.