On Sat, Jul 4, 2020, at 13:19, William Pickard wrote:
A precompiled header is a combination of a plain header with a companion special file (.pch/.gch). The companion file is generated from a source file that is designated as the Precompiled Header creator ('/Yc' on MSVC).
Every other source file is told to use the special file ('/Yu' on MSVC), the source file compilation will fail if the special file is missing.
CPython/third party runtimes will only need to ship this special file with the compiled code, the only downside is a burden of checking the checksum of the file before it's used in a compile process.
But this file can only be used *with the source code* of extension libraries, so shipping this file isn't any better than shipping an ordinary text-based header file (which is, obviously, already done). You seem to believe that the pch/gch file can be used somehow to adapt already-compiled extension libraries to each implementation. I do not think this is true at all, certainly it doesn't seem to be implied by anything in the documentation at https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html .