bpo-45850: Implement deep-freeze on Windows (#29648)

Implement changes to build with deep-frozen modules on Windows.
Note that we now require Python 3.10 as the "bootstrap" or "host" Python.
This causes a modest startup speed (around 7%) on Windows.
This commit is contained in:
Guido van Rossum 2021-11-22 10:09:48 -08:00 committed by GitHub
parent 4d6c0c0cce
commit 1037ca5a8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 500 additions and 24 deletions

View file

@ -502,6 +502,30 @@
<ClCompile Include="..\Python\thread.c" />
<ClCompile Include="..\Python\traceback.c" />
</ItemGroup>
<ItemGroup>
<!-- BEGIN deepfreeze -->
<ClCompile Include="..\Python\deepfreeze\df.importlib._bootstrap.c" />
<ClCompile Include="..\Python\deepfreeze\df.importlib._bootstrap_external.c" />
<ClCompile Include="..\Python\deepfreeze\df.zipimport.c" />
<ClCompile Include="..\Python\deepfreeze\df.abc.c" />
<ClCompile Include="..\Python\deepfreeze\df.codecs.c" />
<ClCompile Include="..\Python\deepfreeze\df.io.c" />
<ClCompile Include="..\Python\deepfreeze\df._collections_abc.c" />
<ClCompile Include="..\Python\deepfreeze\df._sitebuiltins.c" />
<ClCompile Include="..\Python\deepfreeze\df.genericpath.c" />
<ClCompile Include="..\Python\deepfreeze\df.ntpath.c" />
<ClCompile Include="..\Python\deepfreeze\df.posixpath.c" />
<ClCompile Include="..\Python\deepfreeze\df.os.c" />
<ClCompile Include="..\Python\deepfreeze\df.site.c" />
<ClCompile Include="..\Python\deepfreeze\df.stat.c" />
<ClCompile Include="..\Python\deepfreeze\df.__hello__.c" />
<ClCompile Include="..\Python\deepfreeze\df.__phello__.c" />
<ClCompile Include="..\Python\deepfreeze\df.__phello__.ham.c" />
<ClCompile Include="..\Python\deepfreeze\df.__phello__.ham.eggs.c" />
<ClCompile Include="..\Python\deepfreeze\df.__phello__.spam.c" />
<ClCompile Include="..\Python\deepfreeze\df.frozen_only.c" />
<!-- END deepfreeze -->
</ItemGroup>
<ItemGroup Condition="$(IncludeExternals)">
<ClCompile Include="..\Modules\zlibmodule.c" />
<ClCompile Include="$(zlibDir)\adler32.c" />