mirror of https://github.com/python/cpython
bpo-45022: Pin current libffi build to fixed version in preparation for upcoming update (GH-27982)
Also improve the build script for libffi, which is not used as part of the regular build.
This commit is contained in:
parent
fdcb675eed
commit
969ae7f735
|
@ -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
|
||||
if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.3.0
|
||||
if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1k
|
||||
set libraries=%libraries% sqlite-3.35.5.0
|
||||
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.11.0
|
||||
|
@ -76,7 +76,7 @@ for %%e in (%libraries%) do (
|
|||
echo.Fetching external binaries...
|
||||
|
||||
set binaries=
|
||||
if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi
|
||||
if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.3.0
|
||||
if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1k-1
|
||||
if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.11.0
|
||||
if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06
|
||||
|
|
|
@ -38,6 +38,7 @@ set BUILD_ARM32=
|
|||
set BUILD_ARM64=
|
||||
set BUILD_PDB=
|
||||
set BUILD_NOOPT=
|
||||
set COPY_LICENSE=
|
||||
set INSTALL_CYGWIN=
|
||||
|
||||
:CheckOpts
|
||||
|
@ -49,6 +50,7 @@ if /I "%1"=="-arm32" (set BUILD_ARM32=1) & shift & goto :CheckOpts
|
|||
if /I "%1"=="-arm64" (set BUILD_ARM64=1) & shift & goto :CheckOpts
|
||||
if /I "%1"=="-pdb" (set BUILD_PDB=-g) & shift & goto :CheckOpts
|
||||
if /I "%1"=="-noopt" (set BUILD_NOOPT=CFLAGS='-Od -warn all') & shift & goto :CheckOpts
|
||||
if /I "%1"=="-license" (set COPY_LICENSE=1) & shift & goto :CheckOpts
|
||||
if /I "%1"=="-?" goto :Usage
|
||||
if /I "%1"=="--install-cygwin" (set INSTALL_CYGWIN=1) & shift & goto :CheckOpts
|
||||
goto :Usage
|
||||
|
@ -60,6 +62,7 @@ if NOT DEFINED BUILD_X64 if NOT DEFINED BUILD_X86 if NOT DEFINED BUILD_ARM32 if
|
|||
set BUILD_X86=1
|
||||
set BUILD_ARM32=1
|
||||
set BUILD_ARM64=1
|
||||
set COPY_LICENSE=1
|
||||
)
|
||||
|
||||
if "%INSTALL_CYGWIN%"=="1" call :InstallCygwin
|
||||
|
@ -98,9 +101,14 @@ if not exist Makefile.in (
|
|||
)
|
||||
|
||||
if "%BUILD_X64%"=="1" call :BuildOne x64 x86_64-w64-cygwin x86_64-w64-cygwin
|
||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||
if "%BUILD_X86%"=="1" call :BuildOne x86 i686-pc-cygwin i686-pc-cygwin
|
||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||
if "%BUILD_ARM32%"=="1" call :BuildOne x86_arm i686-pc-cygwin arm-w32-cygwin
|
||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||
if "%BUILD_ARM64%"=="1" call :BuildOne x86_arm64 i686-pc-cygwin aarch64-w64-cygwin
|
||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||
if "%COPY_LICENSE%"=="1" copy /y "%LIBFFI_SOURCE%\LICENSE" "%LIBFFI_OUT%\LICENSE"
|
||||
|
||||
popd
|
||||
endlocal
|
||||
|
@ -179,11 +187,11 @@ if "%LIBFFI_TEST%" EQU "1" (
|
|||
|
||||
echo copying files to %_LIBFFI_OUT%
|
||||
if not exist %_LIBFFI_OUT%\include (md %_LIBFFI_OUT%\include)
|
||||
copy %ARTIFACTS%\.libs\libffi-7.dll %_LIBFFI_OUT%
|
||||
copy %ARTIFACTS%\.libs\libffi-7.lib %_LIBFFI_OUT%
|
||||
copy %ARTIFACTS%\.libs\libffi-7.pdb %_LIBFFI_OUT%
|
||||
copy %ARTIFACTS%\fficonfig.h %_LIBFFI_OUT%\include
|
||||
copy %ARTIFACTS%\include\*.h %_LIBFFI_OUT%\include
|
||||
copy %ARTIFACTS%\.libs\libffi-*.dll %_LIBFFI_OUT% || exit /B 1
|
||||
copy %ARTIFACTS%\.libs\libffi-*.lib %_LIBFFI_OUT% || exit /B 1
|
||||
copy %ARTIFACTS%\.libs\libffi-*.pdb %_LIBFFI_OUT%
|
||||
copy %ARTIFACTS%\fficonfig.h %_LIBFFI_OUT%\include || exit /B 1
|
||||
copy %ARTIFACTS%\include\*.h %_LIBFFI_OUT%\include || exit /B 1
|
||||
|
||||
endlocal
|
||||
exit /b
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
<sqlite3Dir>$(ExternalsDir)sqlite-3.35.5.0\</sqlite3Dir>
|
||||
<bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
|
||||
<lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>
|
||||
<libffiDir>$(ExternalsDir)libffi\</libffiDir>
|
||||
<libffiOutDir>$(ExternalsDir)libffi\$(ArchName)\</libffiOutDir>
|
||||
<libffiDir>$(ExternalsDir)libffi-3.3.0\</libffiDir>
|
||||
<libffiOutDir>$(ExternalsDir)libffi-3.3.0\$(ArchName)\</libffiOutDir>
|
||||
<libffiIncludeDir>$(libffiOutDir)include</libffiIncludeDir>
|
||||
<opensslDir>$(ExternalsDir)openssl-1.1.1k\</opensslDir>
|
||||
<opensslOutDir>$(ExternalsDir)openssl-bin-1.1.1k-1\$(ArchName)\</opensslOutDir>
|
||||
|
|
Loading…
Reference in New Issue