]> granicus.if.org Git - python/commitdiff
Avoid a linker warning: MSVC 7 doesn't support /pdb:None, the debug
authorThomas Heller <theller@ctypes.org>
Wed, 10 Nov 2004 09:01:41 +0000 (09:01 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 10 Nov 2004 09:01:41 +0000 (09:01 +0000)
info will always be in a .pdb file.

Lib/distutils/msvccompiler.py

index 168881ad2d75a2fa79315025d9e1daa1afaffcca..ab92801c2b2800ed1366848057d543e42426b9d9 100644 (file)
@@ -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']