On 08/02/2007 19:27, Alexei Alexandrov wrote:
Hi All!
Here is a patch for make_mvc.mak file which is used to build Vim on
Windows. The changes are the following:
1. I had to add "!undef NODEBUG" in one place to make debug
configuration working as needed. Before this change the debug
configuration did the same as release.
2. /ZI (not /Zi) should be used in debug configuration. /ZI creates
much more useful PDB - with just /Zi you will not be able to look at
the values of variables which are currently in registers. Because of
adding /ZI I had to remove /incremental:no from linker flags (don't
know exact implications of this - probably it's good idea to still
have it in release configuration).
Removing incremental:no will result in a larger executable due to the
linker adding padding. A quick check shows removing this option has no
effect so it looks like it had no effect in the first place.
It is moot whether distributing executables with debug information is
useful - for VC builds, without the .pdb file (and the source in the
right place) it is pretty useless.
3. I removed /nodefaultlib switch whenever possible. Having it is a
bad idea by itself - often indicates a dangerous CRT mix. I removed
/nodefaultlib to support Intel Compiler, in fact. Now I can use just
command
nmake -f Make_mvc.mak ... CC=icl
to compile Vim with Intel Compiler. With /nodefaultlib it won't work,
because Intel Compiler adds to object files information about
additonal static library which executable need to link with. Of
course, it can be solved by checking "if it's Intel Compiler then
link with this addditional library", but avoiding /nodefaultlib is a
good idea anyway.
There is a possible issue with VC8 if VIM is linked against any
libraries that require libc.lib - this is no longer part of VC8 builds
and will cause a problem. However, VIM does not seem to currently link
against any such libraries (or at least the couple of builds I do) so it
seems ok to remove.
Mike
--
Don't worry about temptation - as you grow older, it starts avoiding you.