From: Thomas Heller Date: Wed, 10 Nov 2004 09:01:41 +0000 (+0000) Subject: Avoid a linker warning: MSVC 7 doesn't support /pdb:None, the debug X-Git-Tag: v2.4c1~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41f7038a3e685a05b648b1d920bfb0bbcba5e632;p=python Avoid a linker warning: MSVC 7 doesn't support /pdb:None, the debug info will always be in a .pdb file. --- diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 168881ad2d..ab92801c2b 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -237,9 +237,14 @@ class MSVCCompiler (CCompiler) : '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] - self.ldflags_shared_debug = [ - '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG' - ] + if self.__version >= 7: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG' + ] + else: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG' + ] self.ldflags_static = [ '/nologo']