Skip to content

Commit a12c105

Browse files
[3.13] Add note about PYTHON_JIT environment variable to JIT README (GH-121942)
(cherry picked from commit f113c1a) Co-authored-by: Savannah Ostrowski <[email protected]>
1 parent f7b2b2a commit a12c105

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tools/jit/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The JIT Compiler
22
================
33

4-
This version of CPython can be built with an experimental just-in-time compiler. While most everything you already know about building and using CPython is unchanged, you will probably need to install a compatible version of LLVM first.
4+
This version of CPython can be built with an experimental just-in-time compiler[^pep-744]. While most everything you already know about building and using CPython is unchanged, you will probably need to install a compatible version of LLVM first.
55

66
## Installing LLVM
77

@@ -57,6 +57,10 @@ For `PCbuild`-based builds, pass the new `--experimental-jit` option to `build.b
5757

5858
For all other builds, pass the new `--enable-experimental-jit` option to `configure`.
5959

60-
Otherwise, just configure and build as you normally would. Cross-compiling "just works", since the JIT is built for the host platform.
60+
Otherwise, just configure and build as you normally would. Cross-compiling "just works", since the JIT is built for the host platform.
61+
62+
The JIT can also be enabled or disabled using the `PYTHON_JIT` environment variable, even on builds where it is enabled or disabled by default. More details about configuring CPython with the JIT and optional values for `--enable-experimental-jit` can be found [here](https://docs.python.org/dev/whatsnew/3.13.html#experimental-jit-compiler).
63+
64+
[^pep-744]: [PEP 744](https://peps.python.org/pep-0744/)
6165

6266
[^why-llvm]: Clang is specifically needed because it's the only C compiler with support for guaranteed tail calls (`musttail`), which are required by CPython's continuation-passing-style approach to JIT compilation. Since LLVM also includes other functionalities we need (namely, object file parsing and disassembly), it's convenient to only support one toolchain at this time.

0 commit comments

Comments
 (0)