[pypy-svn] r59188 - pypy/branch/cbuild-refactor/pypy/translator/platform

afa at codespeak.net afa at codespeak.net
Fri Oct 17 15:44:25 CEST 2008


Author: afa
Date: Fri Oct 17 15:44:24 2008
New Revision: 59188

Modified:
   pypy/branch/cbuild-refactor/pypy/translator/platform/windows.py
Log:
Windows compilation platform:
- Use debug options only when the interpreter is from a debug build
- give an extension to linked libraries


Modified: pypy/branch/cbuild-refactor/pypy/translator/platform/windows.py
==============================================================================
--- pypy/branch/cbuild-refactor/pypy/translator/platform/windows.py	(original)
+++ pypy/branch/cbuild-refactor/pypy/translator/platform/windows.py	Fri Oct 17 15:44:24 2008
@@ -56,14 +56,19 @@
     cc = 'cl.exe'
     link = 'link.exe'
 
-    cflags = ['/MDd', '/Z7']
-    link_flags = ['/debug']
+    cflags = ['/MD']
+    link_flags = []
 
     def __init__(self, cc=None):
         self.cc = 'cl.exe'
 
+        # Install debug options only when interpreter is in debug mode
+        if sys.executable.lower().endswith('_d.exe'):
+            self.cflags = ['/MDd', '/Z7']
+            self.link_flags = ['/debug']
+
     def _libs(self, libraries):
-        return ['%s' % (lib,) for lib in libraries]
+        return ['%s.lib' % (lib,) for lib in libraries]
 
     def _libdirs(self, library_dirs):
         return ['/LIBPATH:%s' % (ldir,) for ldir in library_dirs]



More information about the Pypy-commit mailing list