• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3  <ItemGroup Label="ProjectConfigurations">
4    <ProjectConfiguration Include="Debug|ARM">
5      <Configuration>Debug</Configuration>
6      <Platform>ARM</Platform>
7    </ProjectConfiguration>
8    <ProjectConfiguration Include="Debug|ARM64">
9      <Configuration>Debug</Configuration>
10      <Platform>ARM64</Platform>
11    </ProjectConfiguration>
12    <ProjectConfiguration Include="Debug|Win32">
13      <Configuration>Debug</Configuration>
14      <Platform>Win32</Platform>
15    </ProjectConfiguration>
16    <ProjectConfiguration Include="Debug|x64">
17      <Configuration>Debug</Configuration>
18      <Platform>x64</Platform>
19    </ProjectConfiguration>
20    <ProjectConfiguration Include="PGInstrument|ARM">
21      <Configuration>PGInstrument</Configuration>
22      <Platform>ARM</Platform>
23    </ProjectConfiguration>
24    <ProjectConfiguration Include="PGInstrument|ARM64">
25      <Configuration>PGInstrument</Configuration>
26      <Platform>ARM64</Platform>
27    </ProjectConfiguration>
28    <ProjectConfiguration Include="PGInstrument|Win32">
29      <Configuration>PGInstrument</Configuration>
30      <Platform>Win32</Platform>
31    </ProjectConfiguration>
32    <ProjectConfiguration Include="PGInstrument|x64">
33      <Configuration>PGInstrument</Configuration>
34      <Platform>x64</Platform>
35    </ProjectConfiguration>
36    <ProjectConfiguration Include="PGUpdate|ARM">
37      <Configuration>PGUpdate</Configuration>
38      <Platform>ARM</Platform>
39    </ProjectConfiguration>
40    <ProjectConfiguration Include="PGUpdate|ARM64">
41      <Configuration>PGUpdate</Configuration>
42      <Platform>ARM64</Platform>
43    </ProjectConfiguration>
44    <ProjectConfiguration Include="PGUpdate|Win32">
45      <Configuration>PGUpdate</Configuration>
46      <Platform>Win32</Platform>
47    </ProjectConfiguration>
48    <ProjectConfiguration Include="PGUpdate|x64">
49      <Configuration>PGUpdate</Configuration>
50      <Platform>x64</Platform>
51    </ProjectConfiguration>
52    <ProjectConfiguration Include="Release|ARM">
53      <Configuration>Release</Configuration>
54      <Platform>ARM</Platform>
55    </ProjectConfiguration>
56    <ProjectConfiguration Include="Release|ARM64">
57      <Configuration>Release</Configuration>
58      <Platform>ARM64</Platform>
59    </ProjectConfiguration>
60    <ProjectConfiguration Include="Release|Win32">
61      <Configuration>Release</Configuration>
62      <Platform>Win32</Platform>
63    </ProjectConfiguration>
64    <ProjectConfiguration Include="Release|x64">
65      <Configuration>Release</Configuration>
66      <Platform>x64</Platform>
67    </ProjectConfiguration>
68  </ItemGroup>
69  <PropertyGroup Label="Globals">
70    <ProjectGuid>{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}</ProjectGuid>
71  </PropertyGroup>
72  <Import Project="python.props" />
73  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
74  <PropertyGroup Label="Configuration">
75    <TargetName>$(PyExeName)</TargetName>
76    <ConfigurationType>Application</ConfigurationType>
77    <UseOfMfc>false</UseOfMfc>
78    <CharacterSet>MultiByte</CharacterSet>
79  </PropertyGroup>
80  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
81  <ImportGroup Label="ExtensionSettings">
82  </ImportGroup>
83  <ImportGroup Label="PropertySheets">
84    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
85    <Import Project="pyproject.props" />
86    <Import Project="tcltk.props" />
87  </ImportGroup>
88  <PropertyGroup Label="UserMacros" />
89  <PropertyGroup>
90    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
91  </PropertyGroup>
92  <ItemDefinitionGroup>
93    <ClCompile>
94      <PreprocessorDefinitions>Py_BUILD_CORE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
95    </ClCompile>
96    <Link>
97      <SubSystem>Console</SubSystem>
98      <StackReserveSize>2000000</StackReserveSize>
99      <StackReserveSize Condition="$(Configuration) == 'Debug'">12000000</StackReserveSize>
100      <StackReserveSize Condition="$(Configuration) == 'PGInstrument'">12000000</StackReserveSize>
101      <!-- HACK: Need additional memory to avoid crashing until gh-113655 is fixed -->
102      <StackReserveSize Condition="$(Configuration) == 'PGUpdate' and $(UseExtraStackReserve) == 'true'">3000000</StackReserveSize>
103    </Link>
104  </ItemDefinitionGroup>
105  <ItemGroup>
106    <None Include="..\PC\pycon.ico" />
107  </ItemGroup>
108  <ItemGroup>
109    <ResourceCompile Include="..\PC\python_exe.rc" />
110  </ItemGroup>
111  <ItemGroup>
112    <ClCompile Include="..\Programs\python.c" />
113  </ItemGroup>
114  <ItemGroup>
115    <ProjectReference Include="pythoncore.vcxproj">
116      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
117      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
118    </ProjectReference>
119  </ItemGroup>
120  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
121  <ImportGroup Label="ExtensionTargets">
122    <Import Project="regen.targets" />
123  </ImportGroup>
124  <Target Name="_TriggerPostRegen" AfterTargets="Build" DependsOnTargets="PostBuildRegen" />
125  <Target Name="GeneratePyBuildDirTxt" AfterTargets="Link">
126    <Message Text="Generating $(OutDir)pybuilddir.txt" />
127    <WriteLinesToFile File="$(OutDir)pybuilddir.txt" Lines="%0D%0A" Overwrite="true" />
128  </Target>
129  <Target Name="ValidateUcrtbase" AfterTargets="AfterBuild" Condition="$(Configuration) != 'PGInstrument' and $(Platform) != 'ARM' and $(Platform) != 'ARM64'">
130    <PropertyGroup>
131      <UcrtName>ucrtbase</UcrtName>
132      <UcrtName Condition="'$(Configuration)' == 'Debug'">ucrtbased</UcrtName>
133    </PropertyGroup>
134    <Exec Command='setlocal
135set PYTHONPATH=$(PySourcePath)Lib
136"$(OutDir)$(PyExeName)$(PyDebugExt).exe" "$(PySourcePath)PC\validate_ucrtbase.py" $(UcrtName)' ContinueOnError="true" />
137  </Target>
138  <Target Name="GeneratePythonBat" AfterTargets="AfterBuild">
139    <PropertyGroup>
140      <_Content>@rem This script invokes the most recently built Python with all arguments
141@rem passed through to the interpreter.  This file is generated by the
142@rem build process and any changes *will* be thrown away by the next
143@rem rebuild.
144@rem This is only meant as a convenience for developing CPython
145@rem and using it outside of that context is ill-advised.
146@echo Running $(Configuration)^|$(Platform) interpreter...
147@setlocal
148@set PYTHONHOME=$(PySourcePath)
149@"$(OutDir)$(PyExeName)$(PyDebugExt).exe" %*
150</_Content>
151      <_ExistingContent Condition="Exists('$(PySourcePath)python.bat')">$([System.IO.File]::ReadAllText('$(PySourcePath)python.bat'))</_ExistingContent>
152    </PropertyGroup>
153    <WriteLinesToFile File="$(PySourcePath)python.bat" Lines="$(_Content)" Overwrite="true" Condition="'$(_Content)' != '$(_ExistingContent)'" />
154  </Target>
155  <Target Name="CopyPGORT" AfterTargets="Link" Condition="$(Configuration) == 'PGInstrument'">
156    <ItemGroup>
157      <_PGORT Include="$(VCToolsInstallDir)bin\Hostx86\x86\pgort140.dll" Condition="$(Platform) == 'Win32'" />
158      <_PGORT Include="$(VCToolsInstallDir)bin\Hostx64\x64\pgort140.dll" Condition="$(Platform) == 'x64'" />
159      <_PGORT Include="$(VCToolsInstallDir)bin\arm64\pgort140.dll" Condition="$(Platform) == 'ARM64'" />
160    </ItemGroup>
161    <Warning Text="Unable to locate pgort140.dll for $(Platform)." Condition="@(_PGORT) == '' or !Exists(@(_PGORT))" />
162    <Copy SourceFiles="@(_PGORT)" DestinationFolder="$(OutDir)">
163      <Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
164    </Copy>
165  </Target>
166</Project>
167