Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a1657b

Browse files
paulmonzooba
authored andcommitted
bpo-35976: Enable Windows projects to build with platform ARM32 (GH-11825)
This change adds the necessary items to the build projects to avoid erroring out right at the start. It does not add _support_ for targeting Windows on ARM32, but is a necessary prerequisite for adding it.
1 parent bb3c05d commit 8a1657b

46 files changed

Lines changed: 959 additions & 5 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ PCbuild/*.VC.db
6969
PCbuild/*.VC.opendb
7070
PCbuild/.vs/
7171
PCbuild/amd64/
72+
PCbuild/arm32/
7273
PCbuild/obj/
7374
PCbuild/win32/
7475
.purify
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added ARM build support to Windows build files in PCBuild.

PC/pyconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ typedef _W64 int ssize_t;
178178
#define PYD_PLATFORM_TAG "win32"
179179
#elif defined(_M_ARM)
180180
#define COMPILER _Py_PASTE_VERSION("32 bit (ARM)")
181-
#define PYD_PLATFORM_TAG "win_arm"
181+
#define PYD_PLATFORM_TAG "win_arm32"
182182
#else
183183
#define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
184184
#endif

PCbuild/_asyncio.vcxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="PGInstrument|ARM">
17+
<Configuration>PGInstrument</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="PGInstrument|Win32">
1321
<Configuration>PGInstrument</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>PGInstrument</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGUpdate|ARM">
29+
<Configuration>PGUpdate</Configuration>
30+
<Platform>ARM</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="PGUpdate|Win32">
2133
<Configuration>PGUpdate</Configuration>
2234
<Platform>Win32</Platform>
@@ -25,6 +37,10 @@
2537
<Configuration>PGUpdate</Configuration>
2638
<Platform>x64</Platform>
2739
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
2844
<ProjectConfiguration Include="Release|Win32">
2945
<Configuration>Release</Configuration>
3046
<Platform>Win32</Platform>

PCbuild/_bz2.vcxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="PGInstrument|ARM">
17+
<Configuration>PGInstrument</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="PGInstrument|Win32">
1321
<Configuration>PGInstrument</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>PGInstrument</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGUpdate|ARM">
29+
<Configuration>PGUpdate</Configuration>
30+
<Platform>ARM</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="PGUpdate|Win32">
2133
<Configuration>PGUpdate</Configuration>
2234
<Platform>Win32</Platform>
@@ -25,6 +37,10 @@
2537
<Configuration>PGUpdate</Configuration>
2638
<Platform>x64</Platform>
2739
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
2844
<ProjectConfiguration Include="Release|Win32">
2945
<Configuration>Release</Configuration>
3046
<Platform>Win32</Platform>

PCbuild/_ctypes.vcxproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="PGInstrument|ARM">
17+
<Configuration>PGInstrument</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="PGInstrument|Win32">
1321
<Configuration>PGInstrument</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>PGInstrument</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGUpdate|ARM">
29+
<Configuration>PGUpdate</Configuration>
30+
<Platform>ARM</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="PGUpdate|Win32">
2133
<Configuration>PGUpdate</Configuration>
2234
<Platform>Win32</Platform>
@@ -25,6 +37,10 @@
2537
<Configuration>PGUpdate</Configuration>
2638
<Platform>x64</Platform>
2739
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
2844
<ProjectConfiguration Include="Release|Win32">
2945
<Configuration>Release</Configuration>
3046
<Platform>Win32</Platform>
@@ -106,6 +122,4 @@
106122
</ProjectReference>
107123
</ItemGroup>
108124
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
109-
<ImportGroup Label="ExtensionTargets">
110-
</ImportGroup>
111125
</Project>

PCbuild/_ctypes_test.vcxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="PGInstrument|ARM">
17+
<Configuration>PGInstrument</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="PGInstrument|Win32">
1321
<Configuration>PGInstrument</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>PGInstrument</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGUpdate|ARM">
29+
<Configuration>PGUpdate</Configuration>
30+
<Platform>ARM</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="PGUpdate|Win32">
2133
<Configuration>PGUpdate</Configuration>
2234
<Platform>Win32</Platform>
@@ -25,6 +37,10 @@
2537
<Configuration>PGUpdate</Configuration>
2638
<Platform>x64</Platform>
2739
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
2844
<ProjectConfiguration Include="Release|Win32">
2945
<Configuration>Release</Configuration>
3046
<Platform>Win32</Platform>

PCbuild/_decimal.vcxproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="PGInstrument|ARM">
17+
<Configuration>PGInstrument</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="PGInstrument|Win32">
1321
<Configuration>PGInstrument</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>PGInstrument</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGUpdate|ARM">
29+
<Configuration>PGUpdate</Configuration>
30+
<Platform>ARM</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="PGUpdate|Win32">
2133
<Configuration>PGUpdate</Configuration>
2234
<Platform>Win32</Platform>
@@ -25,6 +37,10 @@
2537
<Configuration>PGUpdate</Configuration>
2638
<Platform>x64</Platform>
2739
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
2844
<ProjectConfiguration Include="Release|Win32">
2945
<Configuration>Release</Configuration>
3046
<Platform>Win32</Platform>
@@ -63,6 +79,7 @@
6379
<ClCompile>
6480
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6581
<PreprocessorDefinitions Condition="'$(Platform)' == 'Win32'">CONFIG_32;PPRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
82+
<PreprocessorDefinitions Condition="'$(Platform)'=='ARM'">CONFIG_32;ANSI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6683
<PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">CONFIG_64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
6784
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
6885
</ClCompile>
@@ -106,6 +123,7 @@
106123
<ItemGroup>
107124
<CustomBuild Include="..\Modules\_decimal\libmpdec\vcdiv64.asm">
108125
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
126+
<ExcludedFromBuild Condition="'$(Platform)'=='ARM'">true</ExcludedFromBuild>
109127
<Command>ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"</Command>
110128
<Outputs>$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
111129
</CustomBuild>

PCbuild/_elementtree.vcxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="PGInstrument|ARM">
17+
<Configuration>PGInstrument</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="PGInstrument|Win32">
1321
<Configuration>PGInstrument</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>PGInstrument</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGUpdate|ARM">
29+
<Configuration>PGUpdate</Configuration>
30+
<Platform>ARM</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="PGUpdate|Win32">
2133
<Configuration>PGUpdate</Configuration>
2234
<Platform>Win32</Platform>
@@ -25,6 +37,10 @@
2537
<Configuration>PGUpdate</Configuration>
2638
<Platform>x64</Platform>
2739
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
2844
<ProjectConfiguration Include="Release|Win32">
2945
<Configuration>Release</Configuration>
3046
<Platform>Win32</Platform>

PCbuild/_freeze_importlib.vcxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
48
<ProjectConfiguration Include="Debug|Win32">
59
<Configuration>Debug</Configuration>
610
<Platform>Win32</Platform>
@@ -9,6 +13,10 @@
913
<Configuration>Debug</Configuration>
1014
<Platform>x64</Platform>
1115
</ProjectConfiguration>
16+
<ProjectConfiguration Include="PGInstrument|ARM">
17+
<Configuration>PGInstrument</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
1220
<ProjectConfiguration Include="PGInstrument|Win32">
1321
<Configuration>PGInstrument</Configuration>
1422
<Platform>Win32</Platform>
@@ -17,6 +25,10 @@
1725
<Configuration>PGInstrument</Configuration>
1826
<Platform>x64</Platform>
1927
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGUpdate|ARM">
29+
<Configuration>PGUpdate</Configuration>
30+
<Platform>ARM</Platform>
31+
</ProjectConfiguration>
2032
<ProjectConfiguration Include="PGUpdate|Win32">
2133
<Configuration>PGUpdate</Configuration>
2234
<Platform>Win32</Platform>
@@ -25,6 +37,10 @@
2537
<Configuration>PGUpdate</Configuration>
2638
<Platform>x64</Platform>
2739
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
2844
<ProjectConfiguration Include="Release|Win32">
2945
<Configuration>Release</Configuration>
3046
<Platform>Win32</Platform>

0 commit comments

Comments
 (0)