Author: Tim Felgentreff <[email protected]>
Branch: 
Changeset: r72476:dbdcc057562b
Date: 2014-07-21 10:24 +0200
http://bitbucket.org/pypy/pypy/changeset/dbdcc057562b/

Log:    fix compilation with Visual Studio 2013

diff --git a/rpython/translator/platform/windows.py 
b/rpython/translator/platform/windows.py
--- a/rpython/translator/platform/windows.py
+++ b/rpython/translator/platform/windows.py
@@ -375,21 +375,28 @@
         for rule in rules:
             m.rule(*rule)
 
+        if len(headers_to_precompile)>0 and self.version >= 80:
+            # at least from VS2013 onwards we need to include PCH
+            # objects in the final link command
+            linkobjs = 'stdafx.obj @<<\n$(OBJECTS)\n<<'
+        else:
+            linkobjs = '@<<\n$(OBJECTS)\n<<'
+
         if self.version < 80:
             m.rule('$(TARGET)', '$(OBJECTS)',
                     [ '$(CC_LINK) /nologo $(LDFLAGS) $(LDFLAGSEXTRA) /out:$@' 
+\
-                      ' $(LIBDIRS) $(LIBS) @<<\n$(OBJECTS)\n<<',
+                      ' $(LIBDIRS) $(LIBS) ' + linkobjs,
                    ])
         else:
             m.rule('$(TARGET)', '$(OBJECTS)',
                     [ '$(CC_LINK) /nologo $(LDFLAGS) $(LDFLAGSEXTRA)' + \
                       ' $(LINKFILES) /out:$@ $(LIBDIRS) $(LIBS) /MANIFEST' + \
-                      ' /MANIFESTFILE:$*.manifest @<<\n$(OBJECTS)\n<<',
+                      ' /MANIFESTFILE:$*.manifest ' + linkobjs,
                     'mt.exe -nologo -manifest $*.manifest 
-outputresource:$@;1',
                     ])
         m.rule('debugmode_$(TARGET)', '$(OBJECTS)',
                 [ '$(CC_LINK) /nologo /DEBUG $(LDFLAGS) $(LDFLAGSEXTRA)' + \
-                  ' $(LINKFILES) /out:$@ $(LIBDIRS) $(LIBS) 
@<<\n$(OBJECTS)\n<<',
+                  ' $(LINKFILES) /out:$@ $(LIBDIRS) $(LIBS) ' + linkobjs,
                 ])
 
         if shared:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to