makepanda: MSVC switch /Ox to /O2 for opt4

/O2 is more "aggressive" for speed optimization and recommended for release builds, /Ox can be useful for debugging.

Also remove flags implied by /O2

Closes #1016
This commit is contained in:
kamgha 2020-09-12 17:20:53 +02:00 committed by rdb
parent eb367430f7
commit 71f4802630

View File

@ -1126,10 +1126,10 @@ def CompileCxx(obj,src,opts):
if (optlevel==1): cmd += " /MDd /Zi /RTCs /GS" if (optlevel==1): cmd += " /MDd /Zi /RTCs /GS"
if (optlevel==2): cmd += " /MDd /Zi" if (optlevel==2): cmd += " /MDd /Zi"
if (optlevel==3): cmd += " /MD /Zi /GS- /O2 /Ob2 /Oi /Ot /fp:fast" if (optlevel==3): cmd += " /MD /Zi /GS- /O2 /fp:fast"
if (optlevel==4): if (optlevel==4):
cmd += " /MD /Zi /GS- /Ox /Ob2 /Oi /Ot /fp:fast /DFORCE_INLINING /DNDEBUG /GL" cmd += " /MD /Zi /GS- /O2 /fp:fast /DFORCE_INLINING /DNDEBUG /GL"
cmd += " /Oy /Zp16" # jean-claude add /Zp16 insures correct static alignment for SSEx cmd += " /Zp16" # jean-claude add /Zp16 insures correct static alignment for SSEx
cmd += " /Fd" + os.path.splitext(obj)[0] + ".pdb" cmd += " /Fd" + os.path.splitext(obj)[0] + ".pdb"