mirror of https://github.com/python/cpython.git
gh-128472: Add `-skip-funcs` to BOLT options to fix computed goto errors (gh-128511)
* Add `-skip-funcs` to BOLT options to fix computed goto errors Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com> * NEWS --------- Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
This commit is contained in:
parent
953b49e546
commit
24b147a19b
|
@ -0,0 +1,2 @@
|
|||
Skip BOLT optimization of functions using computed gotos, fixing errors on
|
||||
build with LLVM 19.
|
|
@ -9398,7 +9398,7 @@ fi
|
|||
printf %s "checking BOLT_COMMON_FLAGS... " >&6; }
|
||||
if test -z "${BOLT_COMMON_FLAGS}"
|
||||
then
|
||||
BOLT_COMMON_FLAGS=-update-debug-sections
|
||||
BOLT_COMMON_FLAGS=" -update-debug-sections -skip-funcs=_PyEval_EvalFrameDefault,sre_ucs1_match/1,sre_ucs2_match/1,sre_ucs4_match/1 "
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -2170,7 +2170,14 @@ if test -z "${BOLT_COMMON_FLAGS}"
|
|||
then
|
||||
AS_VAR_SET(
|
||||
[BOLT_COMMON_FLAGS],
|
||||
[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
|
||||
|
||||
|
|
Loading…
Reference in New Issue