From 58c6cbb76db7095be3f8863a7608939c905cbaa9 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Wed, 29 Jan 2025 17:27:55 +0000 Subject: [PATCH 1/4] Update configure.rst --- Doc/using/configure.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index b58532acc4b322..faf93f63174bf6 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -311,6 +311,13 @@ General Options By convention, ``--enable-experimental-jit`` is a shorthand for ``--enable-experimental-jit=yes``. + .. note:: + + When building CPython with JIT enabled, ensure that your system has Python 3.11 or later installed. + + Additionally, note that the JIT compiler is incompatible with the ``--disable-gil`` option. + If ``--disable-gil`` is enabled, the JIT will be disabled at runtime, even if it was compiled in. + .. versionadded:: 3.13 .. option:: PKG_CONFIG From f211d3a5dfb906f0f045de0abb36fcaaa6d0bb4d Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Wed, 29 Jan 2025 17:36:21 +0000 Subject: [PATCH 2/4] Suggestion from fidget-spinner --- Doc/using/configure.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index faf93f63174bf6..629859e36cb654 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -315,9 +315,6 @@ General Options When building CPython with JIT enabled, ensure that your system has Python 3.11 or later installed. - Additionally, note that the JIT compiler is incompatible with the ``--disable-gil`` option. - If ``--disable-gil`` is enabled, the JIT will be disabled at runtime, even if it was compiled in. - .. versionadded:: 3.13 .. option:: PKG_CONFIG From fba467f75fa4900b0bd6a5499c0eacaab994e799 Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 29 Jan 2025 20:20:21 +0000 Subject: [PATCH 3/4] Add README note --- Tools/jit/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/jit/README.md b/Tools/jit/README.md index 801c64e4059ccc..d53349fc6eff31 100644 --- a/Tools/jit/README.md +++ b/Tools/jit/README.md @@ -3,6 +3,8 @@ The JIT Compiler 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. +Note that Python 3.11 or newer is required to build JIT. + ## Installing LLVM 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). @@ -54,7 +56,7 @@ For `PCbuild`-based builds, pass the new `--experimental-jit` option to `build.b For all other builds, pass the new `--enable-experimental-jit` option to `configure`. -Otherwise, just configure and build as you normally would. Cross-compiling "just works", since the JIT is built for the host platform. +Otherwise, just configure and build as you normally would. Cross-compiling "just works", since the JIT is built for the host platform. 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). From 43b1d168a56a38f970e4fa6fcf74ac6071fd4f64 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Wed, 29 Jan 2025 22:04:24 +0000 Subject: [PATCH 4/4] Update Tools/jit/README.md Co-authored-by: Brandt Bucher --- Tools/jit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/jit/README.md b/Tools/jit/README.md index d53349fc6eff31..4107265754f6ec 100644 --- a/Tools/jit/README.md +++ b/Tools/jit/README.md @@ -3,7 +3,7 @@ The JIT Compiler 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. -Note that Python 3.11 or newer is required to build JIT. +Python 3.11 or newer is required to build the JIT. ## Installing LLVM