bpo-45188: Windows now regenerates frozen modules at the start of build instead of late (GH-28322)

This will enable us to drop the frozen module header files from the repository.

It does currently cause many source files to be built twice, which just takes more time. For whoever comes to fix this in the future, the files shared between freeze_module and pythoncore should be put into a static library that is consumed by both.
This commit is contained in:
Steve Dower 2021-09-15 18:11:12 +01:00 committed by GitHub
parent d897579a80
commit 09b4ad11f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 278 additions and 68 deletions

View file

@ -25,12 +25,7 @@ static const struct _frozen _PyImport_FrozenModules[] = {
{0, 0, 0} /* sentinel */
};
#ifndef MS_WINDOWS
/* On Windows, this links with the regular pythonXY.dll, so this variable comes
from frozen.obj. In the Makefile, frozen.o is not linked into this executable,
so we define the variable here. */
const struct _frozen *PyImport_FrozenModules;
#endif
static const char header[] =
"/* Auto-generated by Programs/_freeze_module.c */";