bpo-38597: Never statically link extension initialization code on Windows (GH-18724)
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index 0acf7f4..ac73a91 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -536,6 +536,8 @@
<VCRuntimeDLL Include="$(VCRedistDir)\**\vcruntime*.dll" />
</ItemGroup>
<Target Name="_CopyVCRuntime" AfterTargets="Build" Inputs="@(VCRuntimeDLL)" Outputs="$(OutDir)%(Filename)%(Extension)">
+ <!-- bpo-38597: When we switch to another VCRuntime DLL, include vcruntime140.dll as well -->
+ <Warning Text="A copy of vcruntime140.dll is also required" Condition="!$(VCToolsRedistVersion.StartsWith(`14.`))" />
<Copy SourceFiles="%(VCRuntimeDLL.FullPath)" DestinationFolder="$(OutDir)" />
</Target>
<Target Name="_CleanVCRuntime" AfterTargets="Clean">