[Distutils] Compiler options
Thomas Heller
thomas.heller@ion-tof.com
Mon Apr 2 15:13:00 2001
> > I vaguely remember some code which is intended to pickup a CFLAGS
> > environment var.
>
> It's in there, but it really only makes sense on Unix platforms
> where this method is in common use. Still, I'd like to keep all
> distutils setup techniques in Python if possible.
Yes. We need compiler and platform independent compiler flags.
> > Optimization is definitely turned on (distutils uses /Ox /MD /W3 /GX):
> >
> > /Ox - This option combines optimizing options to produce the fastest
> > possible program.
>
> Oh, I didn't know that... anyway, the code generated with the
> few extra options does run noticably faster on my machine.
Maybe there are differences in the pro and 'not pro' compilers,
maybe also between VC5 and VC6?
>
> > /GD is marked as 'for future use'.
>
> Running cl /? gives this explanation:
>
> /GD Optimieren fuer Windows-DLL (optimize for Windows DLL)
My compiler (VC6 prof) gives the same info, 'future use' is mentioned
in the MSDN docs.
Maybe MS simply forgot to remove this flag and the corresponding
/GA flag which generated different code in their 16-bit compiler?
(Note that on win32, dlls and exes are very, very similar)
> BTW, I did see /Ob2 somewhere but can't find any docs for it
> (also it seems to be only available in the VC pro edition).
The /Ob flags specify how to inline functions.
>
> /V<versionstring> might also be useful...
???
Thomas