GH-113464: Add a JIT backend for tier 2 (GH-113465)

Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf).

See Tools/jit/README.md for more information on how to install the required build-time tooling.
This commit is contained in:
Brandt Bucher 2024-01-28 18:48:48 -08:00 committed by GitHub
parent f7c05d7ad3
commit f6d9e5926b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1738 additions and 5 deletions

View file

@ -1579,6 +1579,26 @@ else
AC_MSG_RESULT([no])
fi
# Check for --enable-experimental-jit:
AC_MSG_CHECKING([for --enable-experimental-jit])
AC_ARG_ENABLE([experimental-jit],
[AS_HELP_STRING([--enable-experimental-jit],
[build the experimental just-in-time compiler (default is no)])],
[],
[enable_experimental_jit=no])
AS_VAR_IF([enable_experimental_jit],
[no],
[],
[AS_VAR_APPEND([CFLAGS_NODIST], [" -D_Py_JIT"])
AS_VAR_SET([REGEN_JIT_COMMAND],
["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py $host"])
AS_VAR_IF([Py_DEBUG],
[true],
[AS_VAR_APPEND([REGEN_JIT_COMMAND], [" --debug"])],
[])])
AC_SUBST([REGEN_JIT_COMMAND])
AC_MSG_RESULT([$enable_experimental_jit])
# Enable optimization flags
AC_SUBST([DEF_MAKE_ALL_RULE])
AC_SUBST([DEF_MAKE_RULE])