https://github.com/python/cpython/commit/867e24fed3adfc4c3feb6118e2396fc35587ea6c
commit: 867e24fed3adfc4c3feb6118e2396fc35587ea6c
branch: main
author: Donghee Na <[email protected]>
committer: corona10 <[email protected]>
date: 2026-10-22T00:44:05-07:00
summary:
gh-128884: Update BOLT optimization option to follow the latest version.
(gh-160122)
files:
A Misc/NEWS.d/next/Build/2026-10-21-14-52-56.gh-issue-128884.Xs5jK-.rst
M configure
M configure.ac
diff --git
a/Misc/NEWS.d/next/Build/2026-10-21-14-52-56.gh-issue-128884.Xs5jK-.rst
b/Misc/NEWS.d/next/Build/2026-10-21-14-52-56.gh-issue-128884.Xs5jK-.rst
new file mode 100644
index 00000000000000..53233d06c5053a
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-10-21-14-52-56.gh-issue-128884.Xs5jK-.rst
@@ -0,0 +1,2 @@
+Fix ``--enable-bolt`` build failures on AArch64 with recent LLVM: pass
+``-frame-opt=hot`` only on x86. Patch by Donghee Na.
diff --git a/configure b/configure
index 4c9059f18d8326..04260d2c4b5834 100755
--- a/configure
+++ b/configure
@@ -9780,7 +9780,14 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
if test -z "${BOLT_APPLY_FLAGS}"
then
- BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp
-reorder-functions=cdsort -split-functions -icf=0 -inline-all -split-eh
-reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive
-inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack
-frame-opt=hot "
+ case $host_cpu in #(
+ x86_64) :
+ bolt_frame_opt_flags="-frame-opt=hot" ;; #(
+ *) :
+ bolt_frame_opt_flags=""
+ ;;
+esac
+ BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp
-reorder-functions=cdsort -split-functions -icf=0 -inline-all -split-eh
-reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive
-inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack
${bolt_frame_opt_flags} "
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index 463202793af8d3..b53247194fc900 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2288,6 +2288,12 @@ AC_ARG_VAR(
AC_MSG_CHECKING([BOLT_APPLY_FLAGS])
if test -z "${BOLT_APPLY_FLAGS}"
then
+ dnl The frame optimizer is only implemented for x86. BOLT 22 and newer
+ dnl refuse to run it on other architectures.
+ AS_CASE([$host_cpu],
+ [x86_64], [bolt_frame_opt_flags="-frame-opt=hot"],
+ [bolt_frame_opt_flags=""]
+ )
AS_VAR_SET(
[BOLT_APPLY_FLAGS],
[m4_normalize("
@@ -2305,7 +2311,7 @@ then
-indirect-call-promotion=all
-dyno-stats
-use-gnu-stack
- -frame-opt=hot
+ ${bolt_frame_opt_flags}
")]
)
fi
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]