Re: [AD] msvc7 compiler options |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
here is what needs to be done, i am not very familiar with how to setup
the makefiles to pass this data.. i hope someone else can figure it out..
aj's modified /allegro4118/makefile.vc
optimzed build switches for msvc7
line166: CFLAG =
-Gd Uses the __cdecl calling convention
-Ox Uses maximum optimization (/Ob2gity /Gs)
-GL Enables whole program optimization
-GB on MSVC7 this defaults to -G6: Optimizes code to favor the Pentium
Pro, Pentium II, and Pentium III processors
-GF enable string pooling
i also think this could be added for Athlon and P4:
-arch:SSE
and this for AMD64, P4:
-arch:SSE2
the arch instructions could be put on the TARGET_ARCH_EXCL makefile define.
so that it will only be there for people who specifically request it.
potential problem: using the -GB compiler option genreates code for
PPro/P2/P3, what if the end-user is running a P1 ?
> if we consider msvc7 as a different compiler to msvc6 then its easy.
>
> just as you type fix msvc to start the compile process, we could add a
> msvc7 target.
> that way by default using msvc will default to version 6 command line
> options.. and those that want the extra performance can choice msvc7
Wondeful. Absolutely wonderful.
This shouldn't even be too hard: just change makefile.vc to set MSVC 6
options for those switches that haven't been set yet, then make a
makefile.vc7 that sets those options as appropriate for MSVC7 and then
includes makefile.vc. We don't even have to duplicate an entire makefile.
Please, go ahead and make a patch for this.
Going a bit further, we could even use this to solve the annoying `-mcpu is
deprecated' waring in MinGW... though that'd be less easy as most people
wouldn't readily know what version of MinGW they're using and you can
easily check if the version number is larger than some other version
number. I think this may be a bit too much... it's basically turning
fix.bat into a Windows replacement for configure, which I'll fully admit
is something I miss more and more in Windows... but I'm not sure it's the
right way to go.
Evert