Browse Source

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
kamgha 5 years ago
parent
commit
71f4802630
1 changed files with 3 additions and 3 deletions
  1. 3 3
      makepanda/makepanda.py

+ 3 - 3
makepanda/makepanda.py

@@ -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 += " /Oy /Zp16"      # jean-claude add /Zp16 insures correct static alignment for SSEx
+                cmd += " /MD /Zi /GS- /O2 /fp:fast /DFORCE_INLINING /DNDEBUG /GL"
+                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"