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

afa at codespeak.net afa at codespeak.net
Fri Oct 17 15:33:29 CEST 2008


Author: afa
Date: Fri Oct 17 15:33:28 2008
New Revision: 59187

Modified:
   pypy/branch/cbuild-refactor/pypy/translator/platform/windows.py
Log:
Correct link options for Windows platform.
test_cbuild.py passes


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:33:28 2008
@@ -62,6 +62,19 @@
     def __init__(self, cc=None):
         self.cc = 'cl.exe'
 
+    def _libs(self, libraries):
+        return ['%s' % (lib,) for lib in libraries]
+
+    def _libdirs(self, library_dirs):
+        return ['/LIBPATH:%s' % (ldir,) for ldir in library_dirs]
+
+    def _args_for_shared(self, args):
+        return ['/dll'] + args
+
+    def _link_args_from_eci(self, eci):
+        args = super(Windows, self)._link_args_from_eci(eci)
+        return args + ['/EXPORT:%s' % symbol for symbol in eci.export_symbols]
+        
     def _compile_c_file(self, cc, cfile, compile_args):
         oname = cfile.new(ext='obj')
         args = ['/nologo', '/c'] + compile_args + [str(cfile), '/Fo%s' % (oname,)]



More information about the Pypy-commit mailing list