summaryrefslogtreecommitdiffstats
path: root/PCbuild
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-11-20 17:30:47 (GMT)
committerGitHub <noreply@github.com>2019-11-20 17:30:47 (GMT)
commitde148f263fba75cd10d2cb010fe9c495cee4ec83 (patch)
tree7559853c00252bb9e300e6815ee3615a90e3973b /PCbuild
parentabce2d9bc6b990831d303f4cf9f2de8a6712a1fc (diff)
downloadcpython-de148f263fba75cd10d2cb010fe9c495cee4ec83.zip
cpython-de148f263fba75cd10d2cb010fe9c495cee4ec83.tar.gz
cpython-de148f263fba75cd10d2cb010fe9c495cee4ec83.tar.bz2
bpo-33125: Add support for building and releasing Windows ARM64 packages (GH-16828)
Note that the support is not actually enabled yet, and so we won't be publishing these packages. However, for those who want to build it themselves (even by reusing the Azure Pipelines definition), it's now relatively easy to enable.
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/build.bat2
-rw-r--r--PCbuild/find_msbuild.bat2
-rw-r--r--PCbuild/get_externals.bat2
-rw-r--r--PCbuild/pcbuild.proj2
-rw-r--r--PCbuild/prepare_libffi.bat7
-rw-r--r--PCbuild/python_uwp.vcxproj32
-rw-r--r--PCbuild/pythonw_uwp.vcxproj32
7 files changed, 74 insertions, 5 deletions
diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index bce5993..623409c 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -57,7 +57,7 @@ set conf=Release
set target=Build
set dir=%~dp0
set parallel=/m
-set verbose=/nologo /v:m
+set verbose=/nologo /v:m /clp:summary
set kill=
set do_pgo=
set pgo_job=-m test --pgo
diff --git a/PCbuild/find_msbuild.bat b/PCbuild/find_msbuild.bat
index a2810f0..bc9d00c 100644
--- a/PCbuild/find_msbuild.bat
+++ b/PCbuild/find_msbuild.bat
@@ -32,7 +32,7 @@
@rem VS 2017 and later provide vswhere.exe, which can be used
@if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto :skip_vswhere
@set _Py_MSBuild_Root=
-@for /F "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest') DO @(set _Py_MSBuild_Root=%%i\MSBuild)
+@for /F "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -prerelease') DO @(set _Py_MSBuild_Root=%%i\MSBuild)
@if not defined _Py_MSBuild_Root goto :skip_vswhere
@for %%j in (Current 15.0) DO @if exist "%_Py_MSBuild_Root%\%%j\Bin\msbuild.exe" (set MSBUILD="%_Py_MSBuild_Root%\%%j\Bin\msbuild.exe")
@set _Py_MSBuild_Root=
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
index 100149e..f6daf32 100644
--- a/PCbuild/get_externals.bat
+++ b/PCbuild/get_externals.bat
@@ -52,7 +52,7 @@ echo.Fetching external libraries...
set libraries=
set libraries=%libraries% bzip2-1.0.6
-if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.3.0-rc0-r1
+if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi
if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1d
set libraries=%libraries% sqlite-3.28.0.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
index 35f173f..22a9eed 100644
--- a/PCbuild/pcbuild.proj
+++ b/PCbuild/pcbuild.proj
@@ -60,7 +60,7 @@
<!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->
<ExtensionModules Include="_socket" Condition="!$(IncludeSSL) or !$(IncludeExternals)" />
<ExternalModules Include="_ssl;_hashlib" Condition="$(IncludeSSL)" />
- <ExternalModules Include="_tkinter" Condition="$(IncludeTkinter)" />
+ <ExternalModules Include="_tkinter" Condition="$(IncludeTkinter) and $(Platform) != 'ARM' and $(Platform) != 'ARM64'" />
<ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" />
<Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" />
<!-- Test modules -->
diff --git a/PCbuild/prepare_libffi.bat b/PCbuild/prepare_libffi.bat
index c65a5f7..f41ba83 100644
--- a/PCbuild/prepare_libffi.bat
+++ b/PCbuild/prepare_libffi.bat
@@ -93,7 +93,10 @@ echo LIBFFI_SOURCE: %LIBFFI_SOURCE%
echo MSVCC : %MSVCC%
echo.
-if not exist Makefile.in (%SH% -lc "(cd $LIBFFI_SOURCE; ./autogen.sh;)")
+if not exist Makefile.in (
+ %SH% -lc "(cd $LIBFFI_SOURCE; ./autogen.sh;)"
+ if errorlevel 1 exit /B 1
+)
if "%BUILD_X64%"=="1" call :BuildOne x64 x86_64-w64-cygwin x86_64-w64-cygwin
if "%BUILD_X86%"=="1" call :BuildOne x86 i686-pc-cygwin i686-pc-cygwin
@@ -158,11 +161,13 @@ echo ================================================================
echo Configure the build to generate fficonfig.h and ffi.h
echo ================================================================
%SH% -lc "(cd $OLDPWD; ./configure CC='%MSVCC% %ASSEMBLER% %BUILD_PDB%' CXX='%MSVCC% %ASSEMBLER% %BUILD_PDB%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' %BUILD_NOOPT% NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)"
+if errorlevel 1 exit /B %ERRORLEVEL%
echo ================================================================
echo Building libffi
echo ================================================================
%SH% -lc "(cd $OLDPWD; export PATH=/usr/bin:$PATH; cp src/%SRC_ARCHITECTURE%/ffitarget.h include; make; find .;)"
+if errorlevel 1 exit /B %ERRORLEVEL%
REM Tests are not needed to produce artifacts
if "%LIBFFI_TEST%" EQU "1" (
diff --git a/PCbuild/python_uwp.vcxproj b/PCbuild/python_uwp.vcxproj
index 14e138c..5ff120a 100644
--- a/PCbuild/python_uwp.vcxproj
+++ b/PCbuild/python_uwp.vcxproj
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
@@ -9,6 +17,14 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|ARM">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|ARM64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="PGInstrument|Win32">
<Configuration>PGInstrument</Configuration>
<Platform>Win32</Platform>
@@ -17,6 +33,14 @@
<Configuration>PGInstrument</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|ARM">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|ARM64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="PGUpdate|Win32">
<Configuration>PGUpdate</Configuration>
<Platform>Win32</Platform>
@@ -25,6 +49,14 @@
<Configuration>PGUpdate</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
diff --git a/PCbuild/pythonw_uwp.vcxproj b/PCbuild/pythonw_uwp.vcxproj
index e2c0171..828d0d1 100644
--- a/PCbuild/pythonw_uwp.vcxproj
+++ b/PCbuild/pythonw_uwp.vcxproj
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
@@ -9,6 +17,14 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|ARM">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|ARM64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="PGInstrument|Win32">
<Configuration>PGInstrument</Configuration>
<Platform>Win32</Platform>
@@ -17,6 +33,14 @@
<Configuration>PGInstrument</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|ARM">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|ARM64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="PGUpdate|Win32">
<Configuration>PGUpdate</Configuration>
<Platform>Win32</Platform>
@@ -25,6 +49,14 @@
<Configuration>PGUpdate</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>