john.brawn added a comment. Why not only disable merging of dllexport variables (in GlobalMerge::doInitialization, where we already disable it on various kinds of variables), instead of all variables? Repository: rL LLVM https://reviews.llvm.org/D42127