-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
gh-148646: Add --enable-prebuilt-jit-stencils configure flag #148647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Add a new ``--enable-prebuilt-jit-stencils`` configure flag that forces the | ||
| build to use the existing provided JIT stencil headers even when the digest | ||
| at the beginning of the file does not match expectations. The JIT shim | ||
| object and unwind info are still rebuilt normally. That allows redistributors | ||
| who prebuilt the JIT stencil headers on a system with a different autoconf | ||
| version to still use them even when ``pyconfig.h`` is slightly different. | ||
| It also allow them to build the JIT shim with different LLVM toolchain. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2902,6 +2902,19 @@ AS_VAR_IF([jit_flags], | |
| AC_SUBST([REGEN_JIT_COMMAND]) | ||
| AC_MSG_RESULT([$tier2_flags $jit_flags]) | ||
|
|
||
| # Check for --enable-prebuilt-jit-stencils: | ||
| AC_MSG_CHECKING([for --enable-prebuilt-jit-stencils]) | ||
| AC_ARG_ENABLE([prebuilt-jit-stencils], | ||
| [AS_HELP_STRING([--enable-prebuilt-jit-stencils], | ||
| [accept prebuilt JIT stencil headers even if the digest does not match (default is no)])], | ||
| [], | ||
| [enable_prebuilt_jit_stencils=no]) | ||
| AS_VAR_IF([enable_prebuilt_jit_stencils], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This appends |
||
| [no], | ||
| [], | ||
| [AS_VAR_APPEND([REGEN_JIT_COMMAND], [" --prebuilt"])]) | ||
| AC_MSG_RESULT([$enable_prebuilt_jit_stencils]) | ||
|
|
||
| if test "$disable_gil" = "yes" -a "$enable_experimental_jit" != "no"; then | ||
| # GH-133171: This configuration builds the JIT but never actually uses it, | ||
| # which is surprising (and strictly worse than not building it at all): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
prebuilt=Truebut the stencil file doesn't exist,stencils_currentis False and we fall through to_build_stencils(). It's probably safer to raise in this case instead of silently building fresh stencils despite the user explicitly asking us to use prebuilt ones.