From 344cfd0ef9755168f4f0377e94f72df37dc9042d Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Tue, 6 May 2025 14:05:05 -0700 Subject: [PATCH 1/2] Backport PYTHON_JIT documentation to 3.13 --- Doc/using/cmdline.rst | 8 ++++++++ Doc/whatsnew/3.13.rst | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 96667c916f221a..7f0ea220de6f52 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -1229,6 +1229,14 @@ conflict. .. versionadded:: 3.13 +.. envvar:: PYTHON_JIT + + On builds where experimental just-in-time compilation is available, this + variable can force the JIT to be disabled (``0``) or enabled (``1``) at + interpreter startup. + + .. versionadded:: 3.13 + Debug-mode variables ~~~~~~~~~~~~~~~~~~~~ diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 69960b29f2b7c5..3c991d8f09529e 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -390,11 +390,11 @@ without the optional value. * ``no``: Disable the entire Tier 2 and JIT pipeline. * ``yes``: Enable the JIT. - To disable the JIT at runtime, pass the environment variable ``PYTHON_JIT=0``. + To disable the JIT at runtime, pass the environment variable :envvar:`PYTHON_JIT=0 `. * ``yes-off``: Build the JIT but disable it by default. - To enable the JIT at runtime, pass the environment variable ``PYTHON_JIT=1``. + To enable the JIT at runtime, pass the environment variable :envvar:`PYTHON_JIT=1 `. * ``interpreter``: Enable the Tier 2 interpreter but disable the JIT. - The interpreter can be disabled by running with ``PYTHON_JIT=0``. + The interpreter can be disabled by running with :envvar:`PYTHON_JIT=0 `. The internal architecture is roughly as follows: From 22d11de53bfc8c3150c19805ddbf09ab40b62bd1 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Tue, 6 May 2025 14:05:25 -0700 Subject: [PATCH 2/2] Also backport (.gitignore changes for branch switches) --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2fb1edd9c0fb72..c945904f6b405b 100644 --- a/.gitignore +++ b/.gitignore @@ -138,7 +138,7 @@ Tools/unicode/data/ # hendrikmuhs/ccache-action@v1 /.ccache /cross-build/ -/jit_stencils.h +/jit_stencils*.h /platform /profile-clean-stamp /profile-run-stamp