Skip to content

Commit 406e936

Browse files
Remove windows aarch stencil and update README
1 parent 9f18b7e commit 406e936

File tree

3 files changed

+19
-26983
lines changed

3 files changed

+19
-26983
lines changed

Tools/jit/README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
The JIT Compiler
22
================
33

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.
4+
This version of CPython can be built with an experimental just-in-time compiler[^pep-744].
55

6-
## Installing LLVM
6+
## Building CPython with the JIT enabled
7+
8+
For `PCbuild`-based builds, pass the new `--experimental-jit` option to `build.bat`.
9+
10+
For all other builds, pass the new `--enable-experimental-jit` option to `configure`.
11+
12+
Otherwise, just configure and build as you normally would. Cross-compiling "just works", since the JIT is built for the host platform.
13+
14+
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).
15+
16+
## Contributing to the JIT
17+
18+
While LLVM is not a build-time dependency as stencils as hosted in `Tools/jit/stencils`, you may still want to install LLVM to simplify your local development process (e.g. not have to wait for a CI run to regenerate the stencil for your platform).
19+
20+
### Installing LLVM
721

822
The JIT compiler does not require end users to install any third-party dependencies, but part of it must be *built* using LLVM[^why-llvm]. You are *not* required to build the rest of CPython using LLVM, or even the same version of LLVM (in fact, this is uncommon).
923

1024
LLVM version 19 is required. Both `clang` and `llvm-readobj` need to be installed and discoverable (version suffixes, like `clang-19`, are okay). It's highly recommended that you also have `llvm-objdump` available, since this allows the build script to dump human-readable assembly for the generated code.
1125

1226
It's easy to install all of the required tools:
1327

14-
### Linux
28+
#### Linux
1529

1630
Install LLVM 19 on Ubuntu/Debian:
1731

@@ -27,7 +41,7 @@ Install LLVM 19 on Fedora Linux 40 or newer:
2741
sudo dnf install 'clang(major) = 19' 'llvm(major) = 19'
2842
```
2943

30-
### macOS
44+
#### macOS
3145

3246
Install LLVM 19 with [Homebrew](https://brew.sh):
3347

@@ -37,7 +51,7 @@ brew install llvm@19
3751

3852
Homebrew won't add any of the tools to your `$PATH`. That's okay; the build script knows how to find them.
3953

40-
### Windows
54+
#### Windows
4155

4256
Install LLVM 19 [by searching for it on LLVM's GitHub releases page](https://github.com/llvm/llvm-project/releases?q=19), clicking on "Assets", downloading the appropriate Windows installer for your platform (likely the file ending with `-win64.exe`), and running it. **When installing, be sure to select the option labeled "Add LLVM to the system PATH".**
4357

@@ -47,17 +61,6 @@ Alternatively, you can use [chocolatey](https://chocolatey.org):
4761
choco install llvm --version=19.1.0
4862
```
4963

50-
51-
## Building
52-
53-
For `PCbuild`-based builds, pass the new `--experimental-jit` option to `build.bat`.
54-
55-
For all other builds, pass the new `--enable-experimental-jit` option to `configure`.
56-
57-
Otherwise, just configure and build as you normally would. Cross-compiling "just works", since the JIT is built for the host platform.
58-
59-
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).
60-
6164
[^pep-744]: [PEP 744](https://peps.python.org/pep-0744/)
6265

6366
[^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)