diff options
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/_freeze_module.vcxproj | 31 | ||||
-rw-r--r-- | PCbuild/_freeze_module.vcxproj.filters | 2 | ||||
-rw-r--r-- | PCbuild/_remote_debugging.vcxproj (renamed from PCbuild/_testexternalinspection.vcxproj) | 4 | ||||
-rw-r--r-- | PCbuild/_remote_debugging.vcxproj.filters (renamed from PCbuild/_testexternalinspection.vcxproj.filters) | 2 | ||||
-rw-r--r-- | PCbuild/_testclinic_limited.vcxproj | 1 | ||||
-rw-r--r-- | PCbuild/_zstd.vcxproj | 177 | ||||
-rw-r--r-- | PCbuild/_zstd.vcxproj.filters | 209 | ||||
-rw-r--r-- | PCbuild/build.bat | 10 | ||||
-rwxr-xr-x | PCbuild/get_external.py | 26 | ||||
-rw-r--r-- | PCbuild/get_externals.bat | 5 | ||||
-rw-r--r-- | PCbuild/pcbuild.proj | 6 | ||||
-rw-r--r-- | PCbuild/pcbuild.sln | 39 | ||||
-rw-r--r-- | PCbuild/pyproject.props | 19 | ||||
-rw-r--r-- | PCbuild/python.props | 1 | ||||
-rw-r--r-- | PCbuild/pythoncore.vcxproj | 45 | ||||
-rw-r--r-- | PCbuild/pythoncore.vcxproj.filters | 8 | ||||
-rw-r--r-- | PCbuild/readme.txt | 35 | ||||
-rw-r--r-- | PCbuild/regen.targets | 19 | ||||
-rw-r--r-- | PCbuild/rt.bat | 2 |
19 files changed, 541 insertions, 100 deletions
diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj index 59d664dc174..efff6a58d89 100644 --- a/PCbuild/_freeze_module.vcxproj +++ b/PCbuild/_freeze_module.vcxproj @@ -143,6 +143,7 @@ <ClCompile Include="..\Objects\funcobject.c" /> <ClCompile Include="..\Objects\genericaliasobject.c" /> <ClCompile Include="..\Objects\genobject.c" /> + <ClCompile Include="..\Objects\interpolationobject.c" /> <ClCompile Include="..\Objects\iterobject.c" /> <ClCompile Include="..\Objects\listobject.c" /> <ClCompile Include="..\Objects\longobject.c" /> @@ -158,6 +159,7 @@ <ClCompile Include="..\Objects\setobject.c" /> <ClCompile Include="..\Objects\sliceobject.c" /> <ClCompile Include="..\Objects\structseq.c" /> + <ClCompile Include="..\Objects\templateobject.c" /> <ClCompile Include="..\Objects\tupleobject.c" /> <ClCompile Include="..\Objects\typeobject.c" /> <ClCompile Include="..\Objects\typevarobject.c" /> @@ -188,7 +190,7 @@ <ClCompile Include="..\Python\asdl.c" /> <ClCompile Include="..\Python\assemble.c" /> <ClCompile Include="..\Python\ast.c" /> - <ClCompile Include="..\Python\ast_opt.c" /> + <ClCompile Include="..\Python\ast_preprocess.c" /> <ClCompile Include="..\Python\ast_unparse.c" /> <ClCompile Include="..\Python\bltinmodule.c" /> <ClCompile Include="..\Python\brc.c" /> @@ -274,7 +276,7 @@ <ClCompile Include="..\Python\uniqueid.c" /> </ItemGroup> <ItemGroup> - <ClInclude Include="..\PC\pyconfig.h.in" /> + <ClInclude Include="..\PC\pyconfig.h" /> </ItemGroup> <ItemGroup> <!-- BEGIN frozen modules --> @@ -434,31 +436,6 @@ <ImportGroup Label="ExtensionTargets"> </ImportGroup> - <!-- Direct copy from pythoncore.vcxproj, but this one is only used for our - own build. All other extension modules will use the copy that pythoncore - generates. --> - <Target Name="_UpdatePyconfig" BeforeTargets="PrepareForBuild"> - <MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" /> - <ItemGroup> - <PyConfigH Remove="@(PyConfigH)" /> - <PyConfigH Include="@(ClInclude)" Condition="'%(Filename)%(Extension)' == 'pyconfig.h.in'" /> - </ItemGroup> - <Error Text="Did not find pyconfig.h" Condition="@(ClInclude) == ''" /> - <PropertyGroup> - <PyConfigH>@(PyConfigH->'%(FullPath)', ';')</PyConfigH> - <PyConfigHText>$([System.IO.File]::ReadAllText($(PyConfigH)))</PyConfigHText> - <OldPyConfigH Condition="Exists('$(IntDir)pyconfig.h')">$([System.IO.File]::ReadAllText('$(IntDir)pyconfig.h'))</OldPyConfigH> - </PropertyGroup> - <PropertyGroup Condition="$(DisableGil) == 'true'"> - <PyConfigHText>$(PyConfigHText.Replace('/* #define Py_GIL_DISABLED 1 */', '#define Py_GIL_DISABLED 1'))</PyConfigHText> - </PropertyGroup> - <Message Text="Updating pyconfig.h" Condition="$(PyConfigHText.TrimEnd()) != $(OldPyConfigH.TrimEnd())" /> - <WriteLinesToFile File="$(IntDir)pyconfig.h" - Lines="$(PyConfigHText)" - Overwrite="true" - Condition="$(PyConfigHText.TrimEnd()) != $(OldPyConfigH.TrimEnd())" /> - </Target> - <Target Name="_RebuildGetPath" AfterTargets="_RebuildFrozen" Condition="$(Configuration) != 'PGUpdate'"> <Exec Command='"$(TargetPath)" "%(GetPath.ModName)" "%(GetPath.FullPath)" "%(GetPath.IntFile)"' /> diff --git a/PCbuild/_freeze_module.vcxproj.filters b/PCbuild/_freeze_module.vcxproj.filters index 0a64de1d4f0..332d466b1f7 100644 --- a/PCbuild/_freeze_module.vcxproj.filters +++ b/PCbuild/_freeze_module.vcxproj.filters @@ -34,7 +34,7 @@ <ClCompile Include="..\Python\ast.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\Python\ast_opt.c"> + <ClCompile Include="..\Python\ast_preprocess.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="..\Python\ast_unparse.c"> diff --git a/PCbuild/_testexternalinspection.vcxproj b/PCbuild/_remote_debugging.vcxproj index d5f347ecfec..c55f2908e03 100644 --- a/PCbuild/_testexternalinspection.vcxproj +++ b/PCbuild/_remote_debugging.vcxproj @@ -68,7 +68,7 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{4D7C112F-3083-4D9E-9754-9341C14D9B39}</ProjectGuid> - <RootNamespace>_testexternalinspection</RootNamespace> + <RootNamespace>_remote_debugging</RootNamespace> <Keyword>Win32Proj</Keyword> <SupportPGO>false</SupportPGO> </PropertyGroup> @@ -93,7 +93,7 @@ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> </PropertyGroup> <ItemGroup> - <ClCompile Include="..\Modules\_testexternalinspection.c" /> + <ClCompile Include="..\Modules\_remote_debugging_module.c" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\PC\python_nt.rc" /> diff --git a/PCbuild/_testexternalinspection.vcxproj.filters b/PCbuild/_remote_debugging.vcxproj.filters index feb4343e5c2..ce4437f74e0 100644 --- a/PCbuild/_testexternalinspection.vcxproj.filters +++ b/PCbuild/_remote_debugging.vcxproj.filters @@ -9,7 +9,7 @@ </Filter> </ItemGroup> <ItemGroup> - <ClCompile Include="..\Modules\_testexternalinspection.c" /> + <ClCompile Include="..\Modules\_remote_debugging_module.c" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\PC\python_nt.rc"> diff --git a/PCbuild/_testclinic_limited.vcxproj b/PCbuild/_testclinic_limited.vcxproj index 183a55080e8..95c205309b1 100644 --- a/PCbuild/_testclinic_limited.vcxproj +++ b/PCbuild/_testclinic_limited.vcxproj @@ -70,6 +70,7 @@ <ProjectGuid>{01FDF29A-40A1-46DF-84F5-85EBBD2A2410}</ProjectGuid> <RootNamespace>_testclinic_limited</RootNamespace> <Keyword>Win32Proj</Keyword> + <SupportPGO>false</SupportPGO> </PropertyGroup> <Import Project="python.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> diff --git a/PCbuild/_zstd.vcxproj b/PCbuild/_zstd.vcxproj new file mode 100644 index 00000000000..6f91b8d05cc --- /dev/null +++ b/PCbuild/_zstd.vcxproj @@ -0,0 +1,177 @@ +<?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> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <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> + </ProjectConfiguration> + <ProjectConfiguration Include="PGInstrument|x64"> + <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> + </ProjectConfiguration> + <ProjectConfiguration Include="PGUpdate|x64"> + <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> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{07029b86-f3e9-443e-86fb-78aa6d47fed1}</ProjectGuid> + <RootNamespace>_zstd</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="python.props" /> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Label="Configuration" /> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <PropertyGroup> + <TargetExt>$(PyStdlibPydExt)</TargetExt> + </PropertyGroup> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + </PropertyGroup> + <ItemDefinitionGroup> + <ClCompile> + <PreprocessorDefinitions>WIN32;ZSTD_MULTITHREAD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>$(zstdDir)lib\;$(zstdDir)lib\common;$(zstdDir)lib\compress;$(zstdDir)lib\decompress;$(zstdDir)lib\dictBuilder;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\Modules\_zstd\_zstdmodule.c" /> + <ClCompile Include="..\Modules\_zstd\compressor.c" /> + <ClCompile Include="..\Modules\_zstd\decompressor.c" /> + <ClCompile Include="..\Modules\_zstd\zstddict.c" /> + <ClCompile Include="$(zstdDir)lib\common\debug.c" /> + <ClCompile Include="$(zstdDir)lib\common\entropy_common.c" /> + <ClCompile Include="$(zstdDir)lib\common\error_private.c" /> + <ClCompile Include="$(zstdDir)lib\common\fse_decompress.c" /> + <ClCompile Include="$(zstdDir)lib\common\pool.c" /> + <ClCompile Include="$(zstdDir)lib\common\threading.c" /> + <ClCompile Include="$(zstdDir)lib\common\xxhash.c" /> + <ClCompile Include="$(zstdDir)lib\common\zstd_common.c" /> + <ClCompile Include="$(zstdDir)lib\compress\fse_compress.c" /> + <ClCompile Include="$(zstdDir)lib\compress\hist.c" /> + <ClCompile Include="$(zstdDir)lib\compress\huf_compress.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress_literals.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress_sequences.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress_superblock.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_double_fast.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_fast.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_lazy.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_ldm.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_opt.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstd_preSplit.c" /> + <ClCompile Include="$(zstdDir)lib\compress\zstdmt_compress.c" /> + <ClCompile Include="$(zstdDir)lib\decompress\huf_decompress.c" /> + <ClCompile Include="$(zstdDir)lib\decompress\zstd_ddict.c" /> + <ClCompile Include="$(zstdDir)lib\decompress\zstd_decompress.c" /> + <ClCompile Include="$(zstdDir)lib\decompress\zstd_decompress_block.c" /> + <ClCompile Include="$(zstdDir)lib\dictBuilder\cover.c" /> + <ClCompile Include="$(zstdDir)lib\dictBuilder\divsufsort.c" /> + <ClCompile Include="$(zstdDir)lib\dictBuilder\fastcover.c" /> + <ClCompile Include="$(zstdDir)lib\dictBuilder\zdict.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Modules\_zstd\_zstdmodule.h" /> + <ClInclude Include="..\Modules\_zstd\buffer.h" /> + <ClInclude Include="..\Modules\_zstd\zstddict.h" /> + <ClInclude Include="$(zstdDir)lib\common\bitstream.h" /> + <ClInclude Include="$(zstdDir)lib\common\error_private.h" /> + <ClInclude Include="$(zstdDir)lib\common\fse.h" /> + <ClInclude Include="$(zstdDir)lib\common\huf.h" /> + <ClInclude Include="$(zstdDir)lib\common\mem.h" /> + <ClInclude Include="$(zstdDir)lib\common\pool.h" /> + <ClInclude Include="$(zstdDir)lib\common\threading.h" /> + <ClInclude Include="$(zstdDir)lib\common\xxhash.h" /> + <ClInclude Include="$(zstdDir)lib\common\zstd_internal.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress_literals.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress_sequences.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress_superblock.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_cwksp.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_double_fast.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_fast.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_lazy.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_ldm.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstd_opt.h" /> + <ClInclude Include="$(zstdDir)lib\compress\zstdmt_compress.h" /> + <ClInclude Include="$(zstdDir)lib\decompress\zstd_ddict.h" /> + <ClInclude Include="$(zstdDir)lib\zstd.h" /> + <ClInclude Include="$(zstdDir)lib\zstd_errors.h" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\PC\python_nt.rc" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="pythoncore.vcxproj"> + <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> diff --git a/PCbuild/_zstd.vcxproj.filters b/PCbuild/_zstd.vcxproj.filters new file mode 100644 index 00000000000..eec666e5eaf --- /dev/null +++ b/PCbuild/_zstd.vcxproj.filters @@ -0,0 +1,209 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files\zstd"> + <UniqueIdentifier>{971714e1-ff37-4240-87bf-a36f6afe764f}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\zstd"> + <UniqueIdentifier>{deb43fb6-fa77-4c93-a333-85785fe5f68d}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\Modules\_zstd\_zstdmodule.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Modules\_zstd\compressor.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Modules\_zstd\decompressor.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Modules\_zstd\zstddict.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\debug.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\entropy_common.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\error_private.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\fse_decompress.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\pool.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\threading.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\xxhash.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\common\zstd_common.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\fse_compress.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\hist.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\huf_compress.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress_literals.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress_sequences.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_compress_superblock.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_double_fast.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_fast.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_lazy.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_ldm.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_opt.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstd_preSplit.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\compress\zstdmt_compress.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\decompress\huf_decompress.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\decompress\zstd_ddict.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\decompress\zstd_decompress.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\decompress\zstd_decompress_block.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\dictBuilder\cover.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\dictBuilder\divsufsort.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\dictBuilder\fastcover.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + <ClCompile Include="$(zstdDir)lib\dictBuilder\zdict.c"> + <Filter>Source Files\zstd</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Modules\_zstd\_zstdmodule.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Modules\_zstd\buffer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Modules\_zstd\zstddict.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\zstd.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\zstd_errors.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\bitstream.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\error_private.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\fse.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\huf.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\mem.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\pool.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\threading.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\xxhash.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\common\zstd_internal.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress_literals.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress_sequences.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_compress_superblock.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_cwksp.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_double_fast.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_fast.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_lazy.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_ldm.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstd_opt.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\compress\zstdmt_compress.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + <ClInclude Include="$(zstdDir)lib\decompress\zstd_ddict.h"> + <Filter>Header Files\zstd</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\PC\python_nt.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project> diff --git a/PCbuild/build.bat b/PCbuild/build.bat index db67ae72981..60235704886 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat @@ -33,7 +33,7 @@ echo. -k Attempt to kill any running Pythons before building (usually done echo. automatically by the pythoncore project) echo. --pgo Build with Profile-Guided Optimization. This flag echo. overrides -c and -d -echo. --disable-gil Enable experimental support for running without the GIL. +echo. --disable-gil Enable support for running without the GIL. echo. --test-marker Enable the test marker within the build. echo. --regen Regenerate all opcodes, grammar and tokens. echo. --experimental-jit Enable the experimental just-in-time compiler. @@ -111,6 +111,7 @@ if "%IncludeExternals%"=="" set IncludeExternals=true if "%IncludeCTypes%"=="" set IncludeCTypes=true if "%IncludeSSL%"=="" set IncludeSSL=true if "%IncludeTkinter%"=="" set IncludeTkinter=true +if "%UseJIT%" NEQ "true" set IncludeLLVM=false if "%IncludeExternals%"=="true" call "%dir%get_externals.bat" @@ -123,6 +124,13 @@ if "%do_pgo%" EQU "true" if "%platf%" EQU "x64" ( ) ) +if "%UseDisableGil%" EQU "true" if "%UseTIER2%" NEQ "" ( + rem GH-133171: This configuration builds the JIT but never actually uses it, + rem which is surprising (and strictly worse than not building it at all): + echo.ERROR: --experimental-jit cannot be used with --disable-gil. + exit /b 1 +) + if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc" if exist "%GIT%" set GITProperty=/p:GIT="%GIT%" if not exist "%GIT%" echo Cannot find Git on PATH & set GITProperty= diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index 4ecc8925349..a78aa6a2304 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -5,8 +5,28 @@ import os import pathlib import sys import time +import urllib.error +import urllib.request import zipfile -from urllib.request import urlretrieve + + +def retrieve_with_retries(download_location, output_path, reporthook, + max_retries=7): + """Download a file with exponential backoff retry and save to disk.""" + for attempt in range(max_retries + 1): + try: + resp = urllib.request.urlretrieve( + download_location, + output_path, + reporthook=reporthook, + ) + except (urllib.error.URLError, ConnectionError) as ex: + if attempt == max_retries: + msg = f"Download from {download_location} failed." + raise OSError(msg) from ex + time.sleep(2.25**attempt) + else: + return resp def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): @@ -16,10 +36,10 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): if verbose: reporthook = print zip_dir.mkdir(parents=True, exist_ok=True) - filename, headers = urlretrieve( + filename, _headers = retrieve_with_retries( url, zip_dir / f'{commit_hash}.zip', - reporthook=reporthook, + reporthook ) return filename diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index b28ce9caeb3..e29054f5734 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -15,6 +15,7 @@ set IncludeSSLSrc=false if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts if "%~1"=="--no-openssl" (set IncludeSSL=false) & shift & goto CheckOpts if "%~1"=="--no-libffi" (set IncludeLibffi=false) & shift & goto CheckOpts +if "%~1"=="--no-llvm" (set IncludeLLVM=false) & shift & goto CheckOpts if "%~1"=="--tkinter-src" (set IncludeTkinterSrc=true) & shift & goto CheckOpts if "%~1"=="--openssl-src" (set IncludeSSLSrc=true) & shift & goto CheckOpts if "%~1"=="--libffi-src" (set IncludeLibffiSrc=true) & shift & goto CheckOpts @@ -60,6 +61,7 @@ if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.15. if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.15.0 set libraries=%libraries% xz-5.2.5 set libraries=%libraries% zlib-ng-2.2.4 +set libraries=%libraries% zstd-1.5.7 for %%e in (%libraries%) do ( if exist "%EXTERNALS_DIR%\%%e" ( @@ -80,6 +82,7 @@ if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4 if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.16.2 if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.15.0 if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 +if NOT "%IncludeLLVM%"=="false" set binaries=%binaries% llvm-19.1.7.0 for %%b in (%binaries%) do ( if exist "%EXTERNALS_DIR%\%%b" ( @@ -98,7 +101,7 @@ goto end :usage echo.Valid options: -c, --clean, --clean-only, --organization, --python, -echo.--no-tkinter, --no-openssl +echo.--no-tkinter, --no-openssl, --no-llvm echo. echo.Pull all sources and binaries necessary for compiling optional extension echo.modules that rely on external libraries. diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj index 1bf430e03de..7a5327bf016 100644 --- a/PCbuild/pcbuild.proj +++ b/PCbuild/pcbuild.proj @@ -66,10 +66,10 @@ <!-- pyshellext.dll --> <Projects Include="pyshellext.vcxproj" /> <!-- Extension modules --> - <ExtensionModules Include="_asyncio;_zoneinfo;_decimal;_elementtree;_multiprocessing;_overlapped;pyexpat;_queue;select;unicodedata;winsound;_uuid;_wmi" /> + <ExtensionModules Include="_asyncio;_decimal;_elementtree;_multiprocessing;_overlapped;pyexpat;_queue;_remote_debugging;select;unicodedata;winsound;_uuid;_wmi;_zoneinfo" /> <ExtensionModules Include="_ctypes" Condition="$(IncludeCTypes)" /> <!-- Extension modules that require external sources --> - <ExternalModules Include="_bz2;_lzma;_sqlite3" /> + <ExternalModules Include="_bz2;_lzma;_sqlite3;_zstd" /> <!-- venv launchers --> <Projects Include="venvlauncher.vcxproj;venvwlauncher.vcxproj" /> <!-- _ssl will build _socket as well, which may cause conflicts in parallel builds --> @@ -79,7 +79,7 @@ <ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" /> <Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" /> <!-- Test modules --> - <TestModules Include="_ctypes_test;_testbuffer;_testcapi;_testlimitedcapi;_testexternalinspection;_testinternalcapi;_testembed;_testimportmultiple;_testmultiphase;_testsinglephase;_testconsole;_testclinic;_testclinic_limited" /> + <TestModules Include="_ctypes_test;_testbuffer;_testcapi;_testlimitedcapi;_testinternalcapi;_testembed;_testimportmultiple;_testmultiphase;_testsinglephase;_testconsole;_testclinic;_testclinic_limited" /> <TestModules Include="xxlimited" Condition="'$(Configuration)' == 'Release'" /> <TestModules Include="xxlimited_35" Condition="'$(Configuration)' == 'Release'" /> <Projects Include="@(TestModules->'%(Identity).vcxproj')" Condition="$(IncludeTests)"> diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln index 803bb149c90..7296ea75301 100644 --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln @@ -11,6 +11,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" ProjectSection(ProjectDependencies) = postProject {01FDF29A-40A1-46DF-84F5-85EBBD2A2410} = {01FDF29A-40A1-46DF-84F5-85EBBD2A2410} + {07029B86-F3E9-443E-86FB-78AA6D47FED1} = {07029B86-F3E9-443E-86FB-78AA6D47FED1} {0E9791DB-593A-465F-98BC-681011311617} = {0E9791DB-593A-465F-98BC-681011311617} {0E9791DB-593A-465F-98BC-681011311618} = {0E9791DB-593A-465F-98BC-681011311618} {12728250-16EC-4DC6-94D7-E21DD88947F8} = {12728250-16EC-4DC6-94D7-E21DD88947F8} @@ -81,8 +82,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testclinic", "_testclinic. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testinternalcapi", "_testinternalcapi.vcxproj", "{900342D7-516A-4469-B1AD-59A66E49A25F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testexternalinspection", "_testexternalinspection.vcxproj", "{4D7C112F-3083-4D9E-9754-9341C14D9B39}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcxproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" @@ -165,6 +164,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testlimitedcapi", "_testli EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib-ng", "zlib-ng.vcxproj", "{FB91C8B2-6FBC-3A01-B644-1637111F902D}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_remote_debugging", "_remote_debugging.vcxproj", "{4D7C112F-3083-4D9E-9754-9341C14D9B39}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_zstd", "_zstd.vcxproj", "{07029B86-F3E9-443E-86FB-78AA6D47FED1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -1750,6 +1753,38 @@ Global {4D7C112F-3083-4D9E-9754-9341C14D9B39}.Release|Win32.Build.0 = Release|Win32 {4D7C112F-3083-4D9E-9754-9341C14D9B39}.Release|x64.ActiveCfg = Release|x64 {4D7C112F-3083-4D9E-9754-9341C14D9B39}.Release|x64.Build.0 = Release|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM.ActiveCfg = Debug|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM.Build.0 = Debug|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM64.Build.0 = Debug|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|Win32.ActiveCfg = Debug|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|Win32.Build.0 = Debug|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|x64.ActiveCfg = Debug|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|x64.Build.0 = Debug|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM.Build.0 = PGInstrument|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM.Build.0 = PGUpdate|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM.ActiveCfg = Release|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM.Build.0 = Release|ARM + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM64.ActiveCfg = Release|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM64.Build.0 = Release|ARM64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|Win32.ActiveCfg = Release|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|Win32.Build.0 = Release|Win32 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|x64.ActiveCfg = Release|x64 + {07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index 4e414dc913b..cf35e705f35 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -10,10 +10,9 @@ <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(MSBuildThisFileDirectory)obj\</Py_IntDir> <IntDir>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir> <IntDir>$(IntDir.Replace(`\\`, `\`))</IntDir> - <!-- pyconfig.h is updated by pythoncore.vcxproj, so it's always in pythoncore's IntDir --> - <GeneratedPyConfigDir>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\pythoncore\</GeneratedPyConfigDir> <GeneratedFrozenModulesDir>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)_frozen\</GeneratedFrozenModulesDir> <GeneratedZlibNgDir>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\zlib-ng\</GeneratedZlibNgDir> + <GeneratedJitStencilsDir>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)_$(Configuration)</GeneratedJitStencilsDir> <TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName> <TargetName>$(TargetName)$(PyDebugExt)</TargetName> <GenerateManifest>false</GenerateManifest> @@ -49,11 +48,12 @@ <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64;</_PlatformPreprocessorDefinition> <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64' and $(PlatformToolset) != 'ClangCL'">_M_X64;$(_PlatformPreprocessorDefinition)</_PlatformPreprocessorDefinition> <_Py3NamePreprocessorDefinition>PY3_DLLNAME=L"$(Py3DllName)$(PyDebugExt)";</_Py3NamePreprocessorDefinition> + <_FreeThreadedPreprocessorDefinition Condition="$(DisableGil) == 'true'">Py_GIL_DISABLED=1;</_FreeThreadedPreprocessorDefinition> </PropertyGroup> <ItemDefinitionGroup> <ClCompile> - <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)Include\internal\mimalloc;$(GeneratedPyConfigDir);$(PySourcePath)PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;$(_Py3NamePreprocessorDefinition);$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PyStatsPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)Include\internal\mimalloc;$(PySourcePath)PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;$(_Py3NamePreprocessorDefinition)$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PyStatsPreprocessorDefinition)$(_PydPreprocessorDefinition)$(_FreeThreadedPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(SupportPGO)' and ($(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate')">_Py_USING_PGO=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>MaxSpeed</Optimization> @@ -96,19 +96,16 @@ <TargetMachine Condition="'$(Platform)' == 'x64'">MachineX64</TargetMachine> <TargetMachine Condition="'$(Platform)'=='ARM'">MachineARM</TargetMachine> <TargetMachine Condition="'$(Platform)'=='ARM64'">MachineARM64</TargetMachine> - <ProfileGuidedDatabase Condition="$(SupportPGO)">$(OutDir)$(TargetName).pgd</ProfileGuidedDatabase> - <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> - <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">PGInstrument</LinkTimeCodeGeneration> - <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">PGUpdate</LinkTimeCodeGeneration> + <LinkTimeCodeGeneration Condition="$(Configuration) != 'Debug'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <AdditionalDependencies>advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalOptions Condition="$(Configuration) != 'Debug'">/OPT:REF,NOICF %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions Condition="$(MSVCHasBrokenARM64Clamping) == 'true' and $(Platform) == 'ARM64'">-d2:-pattern-opt-disable:-932189325 %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument' and $(PlatformToolset) != 'ClangCL'">/GENPROFILE %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate' and $(PlatformToolset) != 'ClangCL'">/USEPROFILE %(AdditionalOptions)</AdditionalOptions> </Link> <Lib> <LinkTimeCodeGeneration>false</LinkTimeCodeGeneration> - <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">true</LinkTimeCodeGeneration> - <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">true</LinkTimeCodeGeneration> - <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">true</LinkTimeCodeGeneration> + <LinkTimeCodeGeneration Condition="$(Configuration) != 'Debug'">true</LinkTimeCodeGeneration> </Lib> <ResourceCompile> <AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> diff --git a/PCbuild/python.props b/PCbuild/python.props index 7cb9ad8e65b..ddc7696d276 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -87,6 +87,7 @@ <nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir> <zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.3.1\</zlibDir> <zlibNgDir Condition="$(zlibNgDir) == ''">$(ExternalsDir)\zlib-ng-2.2.4\</zlibNgDir> + <zstdDir Condition="$(zstdDir) == ''">$(ExternalsDir)\zstd-1.5.7\</zstdDir> </PropertyGroup> <PropertyGroup> diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index ce9b056ac25..b911c938563 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -102,6 +102,7 @@ <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(PySourcePath)Modules\_hacl;$(PySourcePath)Modules\_hacl\include;$(PySourcePath)Python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibNgDir);$(GeneratedZlibNgDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories Condition="'$(UseJIT)' == 'true'">$(GeneratedJitStencilsDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";ZLIB_COMPAT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(UseJIT)' == 'true'">_Py_JIT;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -264,6 +265,7 @@ <ClInclude Include="..\Include\internal\pycore_interp_structs.h" /> <ClInclude Include="..\Include\internal\pycore_interpframe.h" /> <ClInclude Include="..\Include\internal\pycore_interpframe_structs.h" /> + <ClInclude Include="..\Include\internal\pycore_interpolation.h" /> <ClInclude Include="..\Include\internal\pycore_intrinsics.h" /> <ClInclude Include="..\Include\internal\pycore_jit.h" /> <ClInclude Include="..\Include\internal\pycore_list.h" /> @@ -310,6 +312,7 @@ <ClInclude Include="..\Include\internal\pycore_structseq.h" /> <ClInclude Include="..\Include\internal\pycore_sysmodule.h" /> <ClInclude Include="..\Include\internal\pycore_symtable.h" /> + <ClInclude Include="..\Include\internal\pycore_template.h" /> <ClInclude Include="..\Include\internal\pycore_time.h" /> <ClInclude Include="..\Include\internal\pycore_token.h" /> <ClInclude Include="..\Include\internal\pycore_traceback.h" /> @@ -407,7 +410,7 @@ <ClInclude Include="..\Parser\string_parser.h" /> <ClInclude Include="..\Parser\pegen.h" /> <ClInclude Include="..\PC\errmap.h" /> - <ClInclude Include="..\PC\pyconfig.h.in" /> + <ClInclude Include="..\PC\pyconfig.h" /> <ClInclude Include="..\Python\condvar.h" /> <ClInclude Include="..\Python\stdlib_module_names.h" /> <ClInclude Include="..\Python\thread_nt.h" /> @@ -416,8 +419,12 @@ <ClCompile Include="..\Modules\_abc.c" /> <ClCompile Include="..\Modules\_bisectmodule.c" /> <ClCompile Include="..\Modules\blake2module.c"> - <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">HACL_CAN_COMPILE_SIMD128;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">HACL_CAN_COMPILE_SIMD256;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'"> + _Py_HACL_CAN_COMPILE_VEC128;%(PreprocessorDefinitions) + </PreprocessorDefinitions> + <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'"> + _Py_HACL_CAN_COMPILE_VEC256;%(PreprocessorDefinitions) + </PreprocessorDefinitions> </ClCompile> <ClCompile Include="..\Modules\_codecsmodule.c" /> <ClCompile Include="..\Modules\_collectionsmodule.c" /> @@ -528,6 +535,7 @@ <ClCompile Include="..\Objects\funcobject.c" /> <ClCompile Include="..\Objects\genericaliasobject.c" /> <ClCompile Include="..\Objects\genobject.c" /> + <ClCompile Include="..\Objects\interpolationobject.c" /> <ClCompile Include="..\Objects\iterobject.c" /> <ClCompile Include="..\Objects\listobject.c" /> <ClCompile Include="..\Objects\longobject.c" /> @@ -543,6 +551,7 @@ <ClCompile Include="..\Objects\setobject.c" /> <ClCompile Include="..\Objects\sliceobject.c" /> <ClCompile Include="..\Objects\structseq.c" /> + <ClCompile Include="..\Objects\templateobject.c" /> <ClCompile Include="..\Objects\tupleobject.c" /> <ClCompile Include="..\Objects\typeobject.c" /> <ClCompile Include="..\Objects\typevarobject.c" /> @@ -576,7 +585,7 @@ <ClCompile Include="..\Python\asdl.c" /> <ClCompile Include="..\Python\assemble.c" /> <ClCompile Include="..\Python\ast.c" /> - <ClCompile Include="..\Python\ast_opt.c" /> + <ClCompile Include="..\Python\ast_preprocess.c" /> <ClCompile Include="..\Python\ast_unparse.c" /> <ClCompile Include="..\Python\bltinmodule.c" /> <ClCompile Include="..\Python\bootstrap_hash.c" /> @@ -684,34 +693,6 @@ </ImportGroup> <Target Name="_TriggerRegen" BeforeTargets="PrepareForBuild" DependsOnTargets="Regen" /> - <Target Name="_UpdatePyconfig" BeforeTargets="PrepareForBuild"> - <MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" /> - <ItemGroup> - <PyConfigH Remove="@(PyConfigH)" /> - <PyConfigH Include="@(ClInclude)" Condition="'%(Filename)%(Extension)' == 'pyconfig.h.in'" /> - </ItemGroup> - <Error Text="Did not find pyconfig.h" Condition="@(ClInclude) == ''" /> - <PropertyGroup> - <PyConfigH>@(PyConfigH->'%(FullPath)', ';')</PyConfigH> - <PyConfigHText>$([System.IO.File]::ReadAllText($(PyConfigH)))</PyConfigHText> - <OldPyConfigH Condition="Exists('$(IntDir)pyconfig.h')">$([System.IO.File]::ReadAllText('$(IntDir)pyconfig.h'))</OldPyConfigH> - </PropertyGroup> - <PropertyGroup Condition="$(DisableGil) == 'true'"> - <PyConfigHText>$(PyConfigHText.Replace('/* #define Py_GIL_DISABLED 1 */', '#define Py_GIL_DISABLED 1'))</PyConfigHText> - </PropertyGroup> - <Message Text="Updating pyconfig.h" Condition="$(PyConfigHText.TrimEnd()) != $(OldPyConfigH.TrimEnd())" /> - <WriteLinesToFile File="$(IntDir)pyconfig.h" - Lines="$(PyConfigHText)" - Overwrite="true" - Condition="$(PyConfigHText.TrimEnd()) != $(OldPyConfigH.TrimEnd())" /> - </Target> - <Target Name="_CopyPyconfig" Inputs="$(IntDir)pyconfig.h" Outputs="$(OutDir)pyconfig.h" AfterTargets="Build" DependsOnTargets="_UpdatePyconfig"> - <Copy SourceFiles="$(IntDir)pyconfig.h" DestinationFolder="$(OutDir)" /> - </Target> - <Target Name="_CleanPyconfig" AfterTargets="Clean"> - <Delete Files="$(IntDir)pyconfig.h;$(OutDir)pyconfig.h" /> - </Target> - <Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild"> <PropertyGroup> <GIT Condition="$(GIT) == ''">git</GIT> diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 2c2eac85941..0e6d42cc959 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -708,6 +708,9 @@ <ClInclude Include="..\Include\internal\pycore_interpframe_structs.h"> <Filter>Include\internal</Filter> </ClInclude> + <ClInclude Include="..\Include\internal\pycore_interpolation.h"> + <Filter>Include\internal</Filter> + </ClInclude> <ClInclude Include="..\Include\internal\pycore_intrinsics.h"> <Filter>Include\cpython</Filter> </ClInclude> @@ -840,6 +843,9 @@ <ClInclude Include="..\Include\internal\pycore_stackref.h"> <Filter>Include\internal</Filter> </ClInclude> + <ClInclude Include="..\Include\internal\pycore_template.h"> + <Filter>Include\internal</Filter> + </ClInclude> <ClInclude Include="..\Include\internal\pycore_time.h"> <Filter>Include\internal</Filter> </ClInclude> @@ -1319,7 +1325,7 @@ <ClCompile Include="..\Python\ast.c"> <Filter>Python</Filter> </ClCompile> - <ClCompile Include="..\Python\ast_opt.c"> + <ClCompile Include="..\Python\ast_preprocess.c"> <Filter>Python</Filter> </ClCompile> <ClCompile Include="..\Python\ast_unparse.c"> diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index 3bf215d907c..3ae3255d933 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -173,24 +173,27 @@ library which are implemented in C; each one builds a DLL (renamed to * _asyncio * _ctypes * _ctypes_test - * _zoneinfo * _decimal * _elementtree * _hashlib * _multiprocessing * _overlapped + * _queue + * _remote_debugging * _socket * _testbuffer * _testcapi - * _testlimitedcapi - * _testinternalcapi * _testclinic * _testclinic_limited * _testconsole * _testimportmultiple + * _testinternalcapi + * _testlimitedcapi * _testmultiphase * _testsinglephase - * _tkinter + * _uuid + * _wmi + * _zoneinfo * pyexpat * select * unicodedata @@ -202,18 +205,22 @@ interpreter, but they do implement several major features. See the "Getting External Sources" section below for additional information about getting the source for building these libraries. The sub-projects are: + _bz2 Python wrapper for version 1.0.8 of the libbzip2 compression library Homepage: http://www.bzip.org/ + _lzma - Python wrapper for version 5.2.2 of the liblzma compression library + Python wrapper for version 5.2.2 of the liblzma compression library, + which is itself built by liblzma.vcxproj. Homepage: https://tukaani.org/xz/ + _ssl Python wrapper for version 3.0.15 of the OpenSSL secure sockets - library, which is downloaded from our binaries repository at - https://github.com/python/cpython-bin-deps. + library, which is itself downloaded from our binaries repository at + https://github.com/python/cpython-bin-deps and built by openssl.vcxproj. Homepage: https://www.openssl.org/ @@ -233,6 +240,7 @@ _sqlite3 Wraps SQLite 3.49.1, which is itself built by sqlite3.vcxproj Homepage: https://www.sqlite.org/ + _tkinter Wraps version 8.6.15 of the Tk windowing system, which is downloaded from our binaries repository at @@ -245,13 +253,20 @@ _tkinter PCbuild\prepare_tcltk.bat. This will retrieve the version of the sources matched to the current commit from the Tcl and Tk branches in our source repository at - https://github.com/python/cpython-source-deps. + https://github.com/python/cpython-source-deps and build them via the + tcl.vcxproj and tk.vcxproj sub-projects. The two projects install their respective components in a directory alongside the source directories called "tcltk" on Win32 and "tcltk64" on x64. They also copy the Tcl and Tk DLLs into the current output directory, which should ensure that Tkinter is able to load Tcl/Tk without having to change your PATH. + +_zstd + Python wrapper for version 1.5.7 of the zstd compression library + Homepage: + https://facebook.github.io/zstd/ + zlib-ng Compiles zlib-ng as a static library, which is later included by pythoncore.vcxproj. This was generated using CMake against zlib-ng @@ -262,6 +277,10 @@ zlib-ng Sources for zlib-ng are imported unmodified into our source repository at https://github.com/python/cpython-source-deps. +_zstd + Python wrapper for version 1.5.7 of the Zstandard compression library + Homepage: + https://facebook.github.io/zstd/ Getting External Sources diff --git a/PCbuild/regen.targets b/PCbuild/regen.targets index 416241d9d0d..742597f5cb5 100644 --- a/PCbuild/regen.targets +++ b/PCbuild/regen.targets @@ -29,8 +29,12 @@ <_KeywordSources Include="$(PySourcePath)Grammar\python.gram;$(PySourcePath)Grammar\Tokens" /> <_KeywordOutputs Include="$(PySourcePath)Lib\keyword.py" /> <!-- Taken from _Target._compute_digest in Tools\jit\_targets.py: --> - <_JITSources Include="$(PySourcePath)Python\executor_cases.c.h;$(GeneratedPyConfigDir)pyconfig.h;$(PySourcePath)Tools\jit\**"/> - <_JITOutputs Include="$(GeneratedPyConfigDir)jit_stencils.h"/> + <_JITSources Include="$(PySourcePath)Python\executor_cases.c.h;$(PySourcePath)PC\pyconfig.h;$(PySourcePath)Tools\jit\**"/> + <!-- Need to explicitly enumerate these, since globbing doesn't work for missing outputs: --> + <_JITOutputs Include="$(GeneratedJitStencilsDir)jit_stencils.h"/> + <_JITOutputs Include="$(GeneratedJitStencilsDir)jit_stencils-aarch64-pc-windows-msvc.h" Condition="$(Platform) == 'ARM64'"/> + <_JITOutputs Include="$(GeneratedJitStencilsDir)jit_stencils-i686-pc-windows-msvc.h" Condition="$(Platform) == 'Win32'"/> + <_JITOutputs Include="$(GeneratedJitStencilsDir)jit_stencils-x86_64-pc-windows-msvc.h" Condition="$(Platform) == 'x64'"/> <_CasesSources Include="$(PySourcePath)Python\bytecodes.c;$(PySourcePath)Python\optimizer_bytecodes.c;"/> <_CasesOutputs Include="$(PySourcePath)Python\generated_cases.c.h;$(PySourcePath)Include\opcode_ids.h;$(PySourcePath)Include\internal\pycore_uop_ids.h;$(PySourcePath)Python\opcode_targets.h;$(PySourcePath)Include\internal\pycore_opcode_metadata.h;$(PySourcePath)Include\internal\pycore_uop_metadata.h;$(PySourcePath)Python\optimizer_cases.c.h;$(PySourcePath)Lib\_opcode_metadata.py"/> <_SbomSources Include="$(PySourcePath)PCbuild\get_externals.bat" /> @@ -112,7 +116,7 @@ <Target Name="_RegenJIT" Condition="'$(UseJIT)' == 'true'" - DependsOnTargets="_UpdatePyconfig;FindPythonForBuild" + DependsOnTargets="FindPythonForBuild" Inputs="@(_JITSources)" Outputs="@(_JITOutputs)"> <PropertyGroup> @@ -121,8 +125,10 @@ <JITArgs Condition="$(Platform) == 'x64'">x86_64-pc-windows-msvc</JITArgs> <JITArgs Condition="$(Configuration) == 'Debug'">$(JITArgs) --debug</JITArgs> </PropertyGroup> - <Exec Command='$(PythonForBuild) "$(PySourcePath)Tools\jit\build.py" $(JITArgs)' - WorkingDirectory="$(GeneratedPyConfigDir)"/> + <Exec Command='$(PythonForBuild) "$(PySourcePath)Tools\jit\build.py" $(JITArgs) --output-dir "$(GeneratedJitStencilsDir)" --pyconfig-dir "$(PySourcePath)PC"'/> + </Target> + <Target Name="_CleanJIT" AfterTargets="Clean"> + <Delete Files="@(_JITOutputs)"/> </Target> <Target Name="_RegenNoPGUpdate" @@ -150,7 +156,8 @@ <_LicenseSources Include="$(PySourcePath)LICENSE; $(PySourcePath)PC\crtlicense.txt; $(bz2Dir)LICENSE; - $(libffiDir)LICENSE;" /> + $(libffiDir)LICENSE; + $(zstdDir)\LICENSE;" /> <_LicenseSources Include="$(opensslOutDir)LICENSE.txt" Condition="Exists('$(opensslOutDir)LICENSE.txt')" /> <_LicenseSources Include="$(opensslOutDir)LICENSE" Condition="!Exists('$(opensslOutDir)LICENSE.txt')" /> <_LicenseSources Include="$(tcltkDir)tcllicense.terms; diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat index c436215780f..f1e06073934 100644 --- a/PCbuild/rt.bat +++ b/PCbuild/rt.bat @@ -42,7 +42,7 @@ if "%~1"=="-O" (set dashO=-O) & shift & goto CheckOpts if "%~1"=="-q" (set qmode=yes) & shift & goto CheckOpts if "%~1"=="-d" (set suffix=_d) & shift & goto CheckOpts rem HACK: Need some way to infer the version number in this script -if "%~1"=="--disable-gil" (set pyname=python3.14t) & shift & goto CheckOpts +if "%~1"=="--disable-gil" (set pyname=python3.15t) & shift & goto CheckOpts if "%~1"=="-win32" (set prefix=%pcbuild%win32) & shift & goto CheckOpts if "%~1"=="-x64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts if "%~1"=="-amd64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts |