It's pretty sure it wouldn't make any difference for this application. The problem is that it's not reasonable to do so for the open source dependencies that are in use because each one has its own build system so disabling the optimizer on everything is not feasible. You may say it would be paranoid to do so, and perhaps it is.camsr wrote:It seems the safest option then is to disable the optimization. It would probably not impact performance in any notable way. Whether or not this is a bug with MSVC would require a much deeper look into the current PE.
There is something else interesting about the microsoft compiler. If you use many open source packages you have to commit the binaries to subversion or git. Then the compiler sometimes complains that one of the packages was built with global optimizations enabled and using /LTCG flag on the linker would improve linker performance, and continues to build by implicitly assuming that /LTCG was given (it starts again as if /LTCG was given) with the following warning:
"MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance"
But if you specify /LTCG explicitly, then it complains that the library was built with an older version of the compiler, but it's not actually very old, only minor versions differ. If they consider versions of visual studio to be incompatible even when minor versions differ then they should reconsider real world implications of their assumptions. The fact that implicit switching to /LTCG does not involve the same version compatibility check is a bit strange also.
I have recompiled all those packages and removed the global optimization flags (/GL) on them. There is no longer suspicious warnings, and the issue remains.