diff options
-rw-r--r-- | win32/Makefile | 13 | ||||
-rw-r--r-- | win32/makefile.mk | 15 |
2 files changed, 19 insertions, 9 deletions
diff --git a/win32/Makefile b/win32/Makefile index 17c4bc2cfd..e8a35c0cf6 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -350,10 +350,17 @@ OPTIMIZE = -Od -MD -Zi -DDEBUGGING ! ENDIF LINK_DBG = -debug !ELSE -# -O1 yields smaller code, which turns out to be faster than -O2 -#OPTIMIZE = -O2 -MD -DNDEBUG -OPTIMIZE = -O1 -MD -DNDEBUG +OPTIMIZE = -MD -DNDEBUG LINK_DBG = -release +! IF "$(WIN64)" == "define" +# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) +OPTIMIZE = $(OPTIMIZE) -Ox -GL +LINK_DBG = $(LINK_DBG) -ltcg +! ELSE +# -O1 yields smaller code, which turns out to be faster than -O2 on x86 +OPTIMIZE = $(OPTIMIZE) -O1 +#OPTIMIZE = $(OPTIMIZE) -O2 +! ENDIF !ENDIF !IF "$(WIN64)" == "define" diff --git a/win32/makefile.mk b/win32/makefile.mk index 1527b27444..35a9eb350f 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -467,14 +467,17 @@ OPTIMIZE = -O1 -MD -Zi -DDEBUGGING .ENDIF LINK_DBG = -debug .ELSE -.IF "$(CFG)" == "Optimize" -# -O1 yields smaller code, which turns out to be faster than -O2 -#OPTIMIZE = -O2 -MD -DNDEBUG -OPTIMIZE = -O1 -MD -DNDEBUG +OPTIMIZE = -MD -DNDEBUG +LINK_DBG = -release +.IF "$(WIN64)" == "define" +# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) +OPTIMIZE += -Ox -GL +LINK_DBG += -ltcg .ELSE -OPTIMIZE = -Od -MD -DNDEBUG +# -O1 yields smaller code, which turns out to be faster than -O2 on x86 +OPTIMIZE += -O1 +#OPTIMIZE += -O2 .ENDIF -LINK_DBG = -release .ENDIF .IF "$(WIN64)" == "define" |