| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ concurrency: | |||
| 21 | 21 | ||
| 22 | 22 | env: | |
| 23 | 23 | FORCE_COLOR: 1 | |
| 24 | - LLVM_VERSION: 20 | ||
| 24 | + LLVM_VERSION: 21 | ||
| 25 | 25 | ||
| 26 | 26 | jobs: | |
| 27 | 27 | interpreter: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ concurrency: | |||
| 20 | 20 | ||
| 21 | 21 | env: | |
| 22 | 22 | FORCE_COLOR: 1 | |
| 23 | - LLVM_VERSION: 20 | ||
| 23 | + LLVM_VERSION: 21 | ||
| 24 | 24 | ||
| 25 | 25 | jobs: | |
| 26 | 26 | windows: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1 +1 @@ | |||
| 1 | - Update JIT compilation to use LLVM 20 at build time. | ||
| 1 | + Update JIT compilation to use LLVM 21 at build time. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,7 +82,7 @@ if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4 | |||
| 82 | 82 | if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.19 | |
| 83 | 83 | if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.15.0 | |
| 84 | 84 | if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 | |
| 85 | - if NOT "%IncludeLLVM%"=="false" set binaries=%binaries% llvm-20.1.8.0 | ||
| 85 | + if NOT "%IncludeLLVM%"=="false" set binaries=%binaries% llvm-21.1.8.0 | ||
| 86 | 86 | ||
| 87 | 87 | for %%b in (%binaries%) do ( | |
| 88 | 88 | if exist "%EXTERNALS_DIR%\%%b" ( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -428,7 +428,7 @@ void patch_x86_64_trampoline(unsigned char *location, int ordinal, jit_state *st | |||
| 428 | 428 | #define DATA_ALIGN 8 | |
| 429 | 429 | #elif defined(__x86_64__) || defined(_M_X64) | |
| 430 | 430 | // x86_64 trampolines: 14 bytes (jmp *(%rip) + 8-byte addr) + 2 bytes padding. | |
| 431 | - // Currently used on macOS where LLVM 20 GOT entries may exceed ±2GB | ||
| 431 | + // Currently used on macOS where LLVM 21 GOT entries may exceed ±2GB | ||
| 432 | 432 | // PC-relative range, but enabled on all x86_64 platforms defensively. | |
| 433 | 433 | #define TRAMPOLINE_SIZE 16 | |
| 434 | 434 | #define DATA_ALIGN 8 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,32 +9,32 @@ Python 3.11 or newer is required to build the JIT. | |||
| 9 | 9 | ||
| 10 | 10 | 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). | |
| 11 | 11 | ||
| 12 | - LLVM version 20 is the officially supported version. You can modify if needed using the `LLVM_VERSION` env var during configure. 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. | ||
| 12 | + LLVM version 21 is the officially supported version. You can modify if needed using the `LLVM_VERSION` env var during configure. Both `clang` and `llvm-readobj` need to be installed and discoverable (version suffixes, like `clang-21`, 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. | ||
| 13 | 13 | ||
| 14 | 14 | It's easy to install all of the required tools: | |
| 15 | 15 | ||
| 16 | 16 | ### Linux | |
| 17 | 17 | ||
| 18 | - Install LLVM 20 on Ubuntu/Debian: | ||
| 18 | + Install LLVM 21 on Ubuntu/Debian: | ||
| 19 | 19 | ||
| 20 | 20 | ```sh | |
| 21 | 21 | wget https://apt.llvm.org/llvm.sh | |
| 22 | 22 | chmod +x llvm.sh | |
| 23 | - sudo ./llvm.sh 20 | ||
| 23 | + sudo ./llvm.sh 21 | ||
| 24 | 24 | ``` | |
| 25 | 25 | ||
| 26 | - Install LLVM 20 on Fedora Linux 40 or newer: | ||
| 26 | + Install LLVM 21 on Fedora Linux 40 or newer: | ||
| 27 | 27 | ||
| 28 | 28 | ```sh | |
| 29 | - sudo dnf install 'clang(major) = 20' 'llvm(major) = 20' | ||
| 29 | + sudo dnf install 'clang(major) = 21' 'llvm(major) = 21' | ||
| 30 | 30 | ``` | |
| 31 | 31 | ||
| 32 | 32 | ### macOS | |
| 33 | 33 | ||
| 34 | - Install LLVM 20 with [Homebrew](https://brew.sh): | ||
| 34 | + Install LLVM 21 with [Homebrew](https://brew.sh): | ||
| 35 | 35 | ||
| 36 | 36 | ```sh | |
| 37 | - brew install llvm@20 | ||
| 37 | + brew install llvm@21 | ||
| 38 | 38 | ``` | |
| 39 | 39 | ||
| 40 | 40 | Homebrew won't add any of the tools to your `$PATH`. That's okay; the build script knows how to find them. | |
@@ -43,18 +43,18 @@ Homebrew won't add any of the tools to your `$PATH`. That's okay; the build scri | |||
| 43 | 43 | ||
| 44 | 44 | LLVM is downloaded automatically (along with other external binary dependencies) by `PCbuild\build.bat`. | |
| 45 | 45 | ||
| 46 | - Otherwise, you can install LLVM 20 [by searching for it on LLVM's GitHub releases page](https://github.com/llvm/llvm-project/releases?q=20), 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".** | ||
| 46 | + Otherwise, you can install LLVM 21 [by searching for it on LLVM's GitHub releases page](https://github.com/llvm/llvm-project/releases?q=21), 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".** | ||
| 47 | 47 | ||
| 48 | 48 | Alternatively, you can use [chocolatey](https://chocolatey.org): | |
| 49 | 49 | ||
| 50 | 50 | ```sh | |
| 51 | - choco install llvm --version=20.1.8 | ||
| 51 | + choco install llvm --version=21.1.8 | ||
| 52 | 52 | ``` | |
| 53 | 53 | ||
| 54 | 54 | ### Dev Containers | |
| 55 | 55 | ||
| 56 | 56 | If you are working on CPython in a [Codespaces instance](https://devguide.python.org/getting-started/setup-building/#using-codespaces), there's no | |
| 57 | - need to install LLVM as the Fedora 42 base image includes LLVM 20 out of the box. | ||
| 57 | + need to install LLVM as the Fedora 42 base image includes LLVM 21 out of the box. | ||
| 58 | 58 | ||
| 59 | 59 | ## Building | |
| 60 | 60 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,9 +10,9 @@ | |||
| 10 | 10 | ||
| 11 | 11 | import _targets | |
| 12 | 12 | ||
| 13 | - _LLVM_VERSION = 20 | ||
| 13 | + _LLVM_VERSION = 21 | ||
| 14 | 14 | _LLVM_VERSION_PATTERN = re.compile(rf"version\s+{_LLVM_VERSION}\.\d+\.\d+\S*\s+") | |
| 15 | - _EXTERNALS_LLVM_TAG = "llvm-20.1.8.0" | ||
| 15 | + _EXTERNALS_LLVM_TAG = "llvm-21.1.8.0" | ||
| 16 | 16 | ||
| 17 | 17 | _P = typing.ParamSpec("_P") | |
| 18 | 18 | _R = typing.TypeVar("_R") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments