Skip to content

Commit

Permalink
pythongh-128472: Add -skip-funcs to BOLT options to fix computed go…
Browse files Browse the repository at this point in the history
…to errors (pythongh-128511)

* Add `-skip-funcs` to BOLT options to fix computed goto errors

Co-authored-by: Gregory Szorc <[email protected]>

* NEWS

---------

(cherry picked from commit 24b147a)

Co-authored-by: Zanie Blue <[email protected]>
Co-authored-by: Gregory Szorc <[email protected]>
  • Loading branch information
2 people authored and miss-islington committed Jan 7, 2025
1 parent fb8bb36 commit ad891c5
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Skip BOLT optimization of functions using computed gotos, fixing errors on
build with LLVM 19.
2 changes: 1 addition & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -2114,7 +2114,14 @@ if test -z "${BOLT_COMMON_FLAGS}"
then
AS_VAR_SET(
[BOLT_COMMON_FLAGS],
[-update-debug-sections]
[m4_normalize("
[-update-debug-sections]
dnl At least LLVM 19.x doesn't support computed gotos in PIC compiled code.
dnl Exclude functions containing computed gotos.
dnl TODO this may be fixed in LLVM 20.x via https://github.com/llvm/llvm-project/pull/120267.
[-skip-funcs=_PyEval_EvalFrameDefault,sre_ucs1_match/1,sre_ucs2_match/1,sre_ucs4_match/1]
")]
)
fi

0 comments on commit ad891c5

Please sign in to comment.