GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 00486: gh-148646: Add --enable-prebuilt-jit-stencils configure flag · fedora-python/cpython@942f78d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Misc/NEWS.d/next/Build
    • 2026-04-16-14-39-33.gh-issue-148646.iIIgWF.rst
  • Tools/jit
    • _targets.py
    • build.py
  • configure.ac
  • configure
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Misc/NEWS.d/next/Build/2026-04-16-14-39-33.gh-issue-148646.iIIgWF.rst‎

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Add a new ``--enable-prebuilt-jit-stencils`` configure flag that forces the
2+
build to use the existing provided JIT stencils even when the digest at the
3+
beginning of the file does not match expectations. That allows
4+
redistributors who prebuilt the JIT stencils on a system with a different
5+
autoconf version to still use them even when ``pyconfig.h`` is slightly
6+
different.
Collapse file

‎Tools/jit/_targets.py‎

Copy file name to clipboardExpand all lines: Tools/jit/_targets.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def build(
205205
*,
206206
comment: str = "",
207207
force: bool = False,
208+
prebuilt: bool = False,
208209
jit_stencils: pathlib.Path,
209210
) -> None:
210211
"""Build jit_stencils.h in the given directory."""
@@ -218,7 +219,7 @@ def build(
218219
if (
219220
not force
220221
and jit_stencils.exists()
221-
and jit_stencils.read_text().startswith(digest)
222+
and (prebuilt or jit_stencils.read_text().startswith(digest))
222223
):
223224
return
224225
stencil_groups = ASYNCIO_RUNNER.run(self._build_stencils())
Collapse file

‎Tools/jit/build.py‎

Copy file name to clipboardExpand all lines: Tools/jit/build.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
parser.add_argument(
4343
"--cflags", help="additional flags to pass to the compiler", default=""
4444
)
45+
parser.add_argument(
46+
"--prebuilt",
47+
action="store_true",
48+
help="accept prebuilt stencils even if the digest does not match",
49+
)
4550
args = parser.parse_args()
4651
for target in args.target:
4752
target.debug = args.debug
@@ -52,6 +57,7 @@
5257
target.build(
5358
comment=comment,
5459
force=args.force,
60+
prebuilt=args.prebuilt,
5561
jit_stencils=args.output_dir / f"jit_stencils-{target.triple}.h",
5662
)
5763
jit_stencils_h = args.output_dir / "jit_stencils.h"
Collapse file

‎configure‎

Copy file name to clipboardExpand all lines: configure
+26Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎configure.ac‎

Copy file name to clipboardExpand all lines: configure.ac
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,6 +2822,19 @@ AC_SUBST([REGEN_JIT_COMMAND])
28222822
AC_SUBST([JIT_STENCILS_H])
28232823
AC_MSG_RESULT([$tier2_flags $jit_flags])
28242824

2825+
# Check for --enable-prebuilt-jit-stencils:
2826+
AC_MSG_CHECKING([for --enable-prebuilt-jit-stencils])
2827+
AC_ARG_ENABLE([prebuilt-jit-stencils],
2828+
[AS_HELP_STRING([--enable-prebuilt-jit-stencils],
2829+
[accept prebuilt JIT stencils even if the digest does not match (default is no)])],
2830+
[],
2831+
[enable_prebuilt_jit_stencils=no])
2832+
AS_VAR_IF([enable_prebuilt_jit_stencils],
2833+
[no],
2834+
[],
2835+
[AS_VAR_APPEND([REGEN_JIT_COMMAND], [" --prebuilt"])])
2836+
AC_MSG_RESULT([$enable_prebuilt_jit_stencils])
2837+
28252838
if test "$disable_gil" = "yes" -a "$enable_experimental_jit" != "no"; then
28262839
# GH-133171: This configuration builds the JIT but never actually uses it,
28272840
# which is surprising (and strictly worse than not building it at all):

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.