Skip to content

Commit a524152

Browse files
authored
gh-118335: Make REGEN_JIT_COMMAND empty if tier2 interpreter enabled (#118493)
Also patch up news blurb for gh-118339 (add warning that PYTHON_UOPS is now PYTHON_JIT).
1 parent 97feb4a commit a524152

File tree

3 files changed

+31
-18
lines changed

3 files changed

+31
-18
lines changed

Misc/NEWS.d/next/Core and Builtins/2024-04-26-14-06-18.gh-issue-118335.SRFsxO.rst

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ Change how to use the tier 2 interpreter. Instead of running Python with
22
``-X uops`` or setting the environment variable ``PYTHON_UOPS=1``, this
33
choice is now made at build time by configuring with
44
``--enable-experimental-jit=interpreter``.
5+
6+
**Beware!** This changes the environment variable to enable or disable
7+
micro-ops to ``PYTHON_JIT``. The old ``PYTHON_UOPS`` is no longer used.

configure

+15-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+13-9
Original file line numberDiff line numberDiff line change
@@ -1776,18 +1776,22 @@ AC_ARG_ENABLE([experimental-jit],
17761776
[],
17771777
[enable_experimental_jit=no])
17781778
case $enable_experimental_jit in
1779-
no) enable_experimental_jit=no ;;
1780-
yes) enable_experimental_jit="-D_Py_JIT -D_Py_TIER2=1" ;;
1781-
yes-off) enable_experimental_jit="-D_Py_JIT -D_Py_TIER2=3" ;;
1782-
interpreter) enable_experimental_jit="-D_Py_TIER2=4" ;;
1783-
interpreter-off) enable_experimental_jit="-D_Py_TIER2=6" ;; # Secret option
1779+
no) jit_flags=""; tier2_flags="" ;;
1780+
yes) jit_flags="-D_Py_JIT"; tier2_flags="-D_Py_TIER2=1" ;;
1781+
yes-off) jit_flags="-D_Py_JIT"; tier2_flags="-D_Py_TIER2=3" ;;
1782+
interpreter) jit_flags=""; tier2_flags="-D_Py_TIER2=4" ;;
1783+
interpreter-off) jit_flags=""; tier2_flags="-D_Py_TIER2=6" ;; # Secret option
17841784
*) AC_MSG_ERROR(
17851785
[invalid argument: --enable-experimental-jit=$enable_experimental_jit; expected no|yes|yes-off|interpreter]) ;;
17861786
esac
1787-
AS_VAR_IF([enable_experimental_jit],
1788-
[no],
1787+
AS_VAR_IF([tier2_flags],
17891788
[],
1790-
[AS_VAR_APPEND([CFLAGS_NODIST], [" $enable_experimental_jit"])
1789+
[],
1790+
[AS_VAR_APPEND([CFLAGS_NODIST], [" $tier2_flags"])])
1791+
AS_VAR_IF([jit_flags],
1792+
[],
1793+
[],
1794+
[AS_VAR_APPEND([CFLAGS_NODIST], [" $jit_flags"])
17911795
AS_VAR_SET([REGEN_JIT_COMMAND],
17921796
["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py $host"])
17931797
AS_VAR_SET([JIT_STENCILS_H], ["jit_stencils.h"])
@@ -1797,7 +1801,7 @@ AS_VAR_IF([enable_experimental_jit],
17971801
[])])
17981802
AC_SUBST([REGEN_JIT_COMMAND])
17991803
AC_SUBST([JIT_STENCILS_H])
1800-
AC_MSG_RESULT([$enable_experimental_jit])
1804+
AC_MSG_RESULT([$tier2_flags $jit_flags])
18011805

18021806
# Enable optimization flags
18031807
AC_SUBST([DEF_MAKE_ALL_RULE])

0 commit comments

Comments
 (0)