Hello. As a follow-up from PEP 774: Removing the LLVM requirement for JIT builds - #36 by hroncok I’d like to be able to build CPython with pre-built JIT stencils.
Pretty much:
- Build the stencils on a platform with the required LLVM version (say, on Fedora).
- Save the stencils (per architecture, per build type (optimized/debug)).
- Use the stencils from above on a different platform without the required LLVM version (say, on RHEL) by dropping them to the out of tree build directory.
I was able to do this with hacks. Notably:
- The
makedependency hierarchy insisted on rebuildingjit_stencils.h. I was able to hack around that by invokingmakewithJIT_DEPS=(empty) (includingmake install). - The PGO task deletes the
jit_stencils.hfile mid build. I was able to hack around that bysed -i '/rm -f jit_stencils.h/d' Makefileafter running./configure.
I was wondering if eliminating the need for those hacks could be a supported use case. E.g. something like --with-jit-stencil=my-file.h which would copy it instead of trying to rebuild it?
Thanks.