Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7589d71

Browse files
authored
gh-101060: conditionally add -fno-reorder-blocks-and-partition (gh-101061)
1 parent 7f95ec3 commit 7589d71

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Conditionally add ``-fno-reorder-blocks-and-partition`` in configure.
2+
Effectively fixes ``--enable-bolt`` when using Clang, as this appears to be
3+
a GCC-only flag.

configure

Lines changed: 40 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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,8 +1939,13 @@ if test "$Py_BOLT" = 'true' ; then
19391939
DEF_MAKE_ALL_RULE="bolt-opt"
19401940
DEF_MAKE_RULE="build_all"
19411941

1942+
# -fno-reorder-blocks-and-partition is required for bolt to work.
1943+
# Possibly GCC only.
1944+
AX_CHECK_COMPILE_FLAG([-fno-reorder-blocks-and-partition],[
1945+
CFLAGS_NODIST="$CFLAGS_NODIST -fno-reorder-blocks-and-partition"
1946+
])
1947+
19421948
# These flags are required for bolt to work:
1943-
CFLAGS_NODIST="$CFLAGS_NODIST -fno-reorder-blocks-and-partition"
19441949
LDFLAGS_NODIST="$LDFLAGS_NODIST -Wl,--emit-relocs"
19451950

19461951
# These flags are required to get good performance from bolt:

0 commit comments

Comments
 (0)