Skip to content

Commit

Permalink
pythongh-101060: conditionally add -fno-reorder-blocks-and-partition (
Browse files Browse the repository at this point in the history
  • Loading branch information
indygreg authored Jan 24, 2023
1 parent 7f95ec3 commit 7589d71
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Conditionally add ``-fno-reorder-blocks-and-partition`` in configure.
Effectively fixes ``--enable-bolt`` when using Clang, as this appears to be
a GCC-only flag.
41 changes: 40 additions & 1 deletion configure

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

7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1939,8 +1939,13 @@ if test "$Py_BOLT" = 'true' ; then
DEF_MAKE_ALL_RULE="bolt-opt"
DEF_MAKE_RULE="build_all"

# -fno-reorder-blocks-and-partition is required for bolt to work.
# Possibly GCC only.
AX_CHECK_COMPILE_FLAG([-fno-reorder-blocks-and-partition],[
CFLAGS_NODIST="$CFLAGS_NODIST -fno-reorder-blocks-and-partition"
])

# These flags are required for bolt to work:
CFLAGS_NODIST="$CFLAGS_NODIST -fno-reorder-blocks-and-partition"
LDFLAGS_NODIST="$LDFLAGS_NODIST -Wl,--emit-relocs"

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

0 comments on commit 7589d71

Please sign in to comment.