From b4181a49f68ad9f74da3990789854e01366ed393 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 16 Apr 2010 11:27:55 +0000 Subject: [PATCH] 2010-04-16 13:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/win/msvc.mk * utils/hbmk2/hbmk2.prg * Replaced -Ot2b1 win/msvc* option with -O2 as recommended by Microsoft, and in sync with GNU Make. This will result in somewhat larger executable, but this gives the best overall performance. AFAICS this change will practically allow automatic inlining to take place. This puts msvc in the lead again compared to mingw regarding speed. * config/wce/msvcarm.mk * Deleted bogus option -Od turning off all optimization for wce/msvcarm targets for new compiler versions. * config/wce/msvcarm.mk * config/win/msvc.mk * Deleted Exception Handling options from all msvc cmdlines where it was supplied. It has a heritage from the past, and I could depict no sense in the setup: - old wce/msvcarm: -EHsc - new wce/msvcarm: -EHsc- - old win/msvc*: none - new win/msvc*: -EHs-c- The only place this could be needed ATM is hbqt, so pls report results after this change, or unleash any information about proper usage of these options. NOTE: These options were already left out from hbmk2. * utils/hbmk2/hbmk2.prg * Deleted -YX option for old msvc versions. (to be in sync with this recent change in GNU Make) * Synced msvcarm options for new compiler versions with GNU Make. (deleted bogus -Od and some other options) ; TODO: msvc optimization options for old compiler version could still use a revamp. --- harbour/ChangeLog | 36 +++++++++++++++++++++++++++++++++++ harbour/config/wce/msvcarm.mk | 4 ++-- harbour/config/win/msvc.mk | 2 +- harbour/utils/hbmk2/hbmk2.prg | 8 ++++---- 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c9fa471052..a90fcffbfd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,42 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-04-16 13:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/win/msvc.mk + * utils/hbmk2/hbmk2.prg + * Replaced -Ot2b1 win/msvc* option with -O2 as recommended by Microsoft, + and in sync with GNU Make. This will result in somewhat larger + executable, but this gives the best overall performance. AFAICS + this change will practically allow automatic inlining to take place. + This puts msvc in the lead again compared to mingw regarding speed. + + * config/wce/msvcarm.mk + * Deleted bogus option -Od turning off all optimization for + wce/msvcarm targets for new compiler versions. + + * config/wce/msvcarm.mk + * config/win/msvc.mk + * Deleted Exception Handling options from all msvc cmdlines + where it was supplied. It has a heritage from the past, and + I could depict no sense in the setup: + - old wce/msvcarm: -EHsc + - new wce/msvcarm: -EHsc- + - old win/msvc*: none + - new win/msvc*: -EHs-c- + The only place this could be needed ATM is hbqt, so pls report + results after this change, or unleash any information about + proper usage of these options. + NOTE: These options were already left out from hbmk2. + + * utils/hbmk2/hbmk2.prg + * Deleted -YX option for old msvc versions. (to be in sync with + this recent change in GNU Make) + * Synced msvcarm options for new compiler versions with GNU Make. + (deleted bogus -Od and some other options) + + ; TODO: msvc optimization options for old compiler version could + still use a revamp. + 2010-04-16 11:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL ! Typo in msvcarm 2008 example. diff --git a/harbour/config/wce/msvcarm.mk b/harbour/config/wce/msvcarm.mk index 86159a2e92..0128459059 100644 --- a/harbour/config/wce/msvcarm.mk +++ b/harbour/config/wce/msvcarm.mk @@ -60,9 +60,9 @@ endif ifneq ($(HB_BUILD_OPTIM),no) ifneq ($(filter $(HB_COMPILER_VER),600 700 710),) - CFLAGS += -Oxsb1 -EHsc -GF + CFLAGS += -Oxsb1 -GF else - CFLAGS += -Od -Os -Gy -EHsc- + CFLAGS += -Os -Gy endif endif diff --git a/harbour/config/win/msvc.mk b/harbour/config/win/msvc.mk index a3cef9088e..12cb8fdbde 100644 --- a/harbour/config/win/msvc.mk +++ b/harbour/config/win/msvc.mk @@ -41,7 +41,7 @@ ifneq ($(HB_BUILD_OPTIM),no) ifneq ($(filter $(HB_COMPILER_VER),600 700 710),) CFLAGS += -Ogt2yb1p -GX- -G6 else - CFLAGS += -Ot2b1 -EHs-c- + CFLAGS += -O2 endif endif diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 8d6a19a1f6..bf0adcecd3 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -3262,15 +3262,15 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) IF hbmk[ _HBMK_lOPTIM ] IF hbmk[ _HBMK_cPLAT ] == "wce" IF nCCompVer >= 800 - cOpt_CompC += " -Od -Os -Gy -Gm -Zi -GR-" + cOpt_CompC += " -Os -Gy" ELSE - cOpt_CompC += " -Oxsb1 -YX -GF" + cOpt_CompC += " -Oxsb1 -GF" ENDIF ELSE IF nCCompVer >= 800 - cOpt_CompC += " -Ot2b1" + cOpt_CompC += " -O2" ELSE - cOpt_CompC += " -Ogt2yb1p -GX- -G6 -YX" + cOpt_CompC += " -Ogt2yb1p -GX- -G6" ENDIF ENDIF ENDIF