diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-01-31 19:17:07 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-01-31 19:17:07 (GMT) |
commit | e5a6c4ecfc31ee7acca853314822dddde62bd6ca (patch) | |
tree | 5029233d544e1ec4effcf050756a73c0826b362c | |
parent | 59ecabd12a173e6b176b70ba9a4292adec3ba31d (diff) | |
download | cpython-e5a6c4ecfc31ee7acca853314822dddde62bd6ca.zip cpython-e5a6c4ecfc31ee7acca853314822dddde62bd6ca.tar.gz cpython-e5a6c4ecfc31ee7acca853314822dddde62bd6ca.tar.bz2 |
Fixes python3_d.dll build so that functions are forwarded to python35_d.dll
-rw-r--r-- | PCbuild/python3dll.vcxproj | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj index 4c5cd1e..b03d09f 100644 --- a/PCbuild/python3dll.vcxproj +++ b/PCbuild/python3dll.vcxproj @@ -66,7 +66,8 @@ </ClCompile> <Link> <AdditionalDependencies>$(OutDir)$(TargetName)stub.lib</AdditionalDependencies> - <ModuleDefinitionFile>$(PySourcePath)PC\python3.def</ModuleDefinitionFile> + <ModuleDefinitionFile Condition="$(Configuration) != 'Debug'">$(PySourcePath)PC\python3.def</ModuleDefinitionFile> + <ModuleDefinitionFile Condition="$(Configuration) == 'Debug'">$(IntDir)python3_d.def</ModuleDefinitionFile> <EntryPointSymbol>DllMain</EntryPointSymbol> </Link> <PreLinkEvent> @@ -87,9 +88,37 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> + + <Target Name="BuildPython3_dDef" BeforeTargets="BuildStubDef" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3_d.def" Condition="$(Configuration) == 'Debug'"> + <ItemGroup> + <_DefLines Remove="@(_DefLines)" /> + <_Lines Remove="@(_Lines)" /> + </ItemGroup> + <ReadLinesFromFile File="..\PC\python3.def"> + <Output TaskParameter="Lines" ItemName="_DefLines" /> + </ReadLinesFromFile> + <PropertyGroup> + <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\.</_Pattern1> + <_Sub1>$1_d.</_Sub1> + <_Pattern2>"python3"</_Pattern2> + <_Sub2>"python3_d"</_Sub2> + </PropertyGroup> + <ItemGroup> + <_Lines Include="@(_DefLines)"> + <New>$([System.Text.RegularExpressions.Regex]::Replace($([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern1)`, `$(_Sub1)`)), `$(_Pattern2)`, `$(_Sub2)`))</New> + </_Lines> + </ItemGroup> + <MakeDir Directories="$(IntDir)" /> + <WriteLinesToFile File="$(IntDir)python3_d.def" Lines="@(_Lines->'%(New)')" /> + </Target> + <Target Name="BuildStubDef" BeforeTargets="PreLinkEvent" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3stub.def"> + <ItemGroup> + <_DefLines Remove="@(_DefLines)" /> + <_Lines Remove="@(_Lines)" /> + </ItemGroup> <ReadLinesFromFile File="..\PC\python3.def"> - <Output TaskParameter="Lines" ItemName="DefLines" /> + <Output TaskParameter="Lines" ItemName="_DefLines" /> </ReadLinesFromFile> <PropertyGroup> <_Pattern>^[\w.]+=.+?\.([^ ]+).*$</_Pattern> @@ -97,7 +126,7 @@ </PropertyGroup> <ItemGroup> <_Lines Include="EXPORTS" /> - <_Symbols Include="@(DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))"> + <_Symbols Include="@(_DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))"> <Symbol>$([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern)`, `$(_Sub)`))</Symbol> </_Symbols> <_Lines Include="@(_Symbols->'%(Symbol)')" /> |