]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update default msvccompiler link options to match the options used for core builds.
authorSteve Dower <steve.dower@microsoft.com>
Thu, 30 Jul 2015 18:51:06 +0000 (11:51 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Thu, 30 Jul 2015 18:51:06 +0000 (11:51 -0700)
This ensures that wheels will work when moved to machines that have the same subset of the MSVC libraries as a regular CPython install. Specifically, vcruntime##0.dll may not be installed, and should not be a dependency.

Lib/distutils/_msvccompiler.py

index 896d9d927fa6069150355a214e6c9b7a54293d19..4e2eed72a99c7a69565c49917f373da0960b4b2c 100644 (file)
@@ -207,10 +207,10 @@ class MSVCCompiler(CCompiler) :
         ]
 
         self.ldflags_shared = [
-            '/nologo', '/DLL', '/INCREMENTAL:NO'
+            '/nologo', '/DLL', '/INCREMENTAL:NO', '/LTCG', '/nodefaultlib:libucrt.lib', 'ucrt.lib'
         ]
         self.ldflags_shared_debug = [
-            '/nologo', '/DLL', '/INCREMENTAL:no', '/DEBUG:FULL'
+            '/nologo', '/DLL', '/INCREMENTAL:no', '/LTCG', '/DEBUG:FULL', '/nodefaultlib:libucrtd.lib', 'ucrtd.lib'
         ]
         self.ldflags_static = [
             '/nologo'