Skip to content

Commit 867e24f

Browse files
authored
gh-128884: Update BOLT optimization option to follow the latest version. (gh-160122)
1 parent c3bcc92 commit 867e24f

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix ``--enable-bolt`` build failures on AArch64 with recent LLVM: pass
2+
``-frame-opt=hot`` only on x86. Patch by Donghee Na.

‎configure‎

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2288,6 +2288,12 @@ AC_ARG_VAR(
22882288
AC_MSG_CHECKING([BOLT_APPLY_FLAGS])
22892289
if test -z "${BOLT_APPLY_FLAGS}"
22902290
then
2291+
dnl The frame optimizer is only implemented for x86. BOLT 22 and newer
2292+
dnl refuse to run it on other architectures.
2293+
AS_CASE([$host_cpu],
2294+
[x86_64], [bolt_frame_opt_flags="-frame-opt=hot"],
2295+
[bolt_frame_opt_flags=""]
2296+
)
22912297
AS_VAR_SET(
22922298
[BOLT_APPLY_FLAGS],
22932299
[m4_normalize("
@@ -2305,7 +2311,7 @@ then
23052311
-indirect-call-promotion=all
23062312
-dyno-stats
23072313
-use-gnu-stack
2308-
-frame-opt=hot
2314+
${bolt_frame_opt_flags}
23092315
")]
23102316
)
23112317
fi

0 commit comments

Comments
 (0)