Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``./configure`` now warns when ``--enable-optimizations`` and ``CFLAGS=-O0`` are both set, suggesting removing ``-O0`` from ``CFLAGS`` for optimal performance. Patch by Taegyun Kim.
11 changes: 11 additions & 0 deletions configure

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

8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,14 @@ fi],
[AC_MSG_RESULT([no])])

if test "$Py_OPT" = 'true' ; then
# Check for conflicting CFLAGS=-O0 and --enable-optimizations
case "$CFLAGS" in
*-O0*)
AC_MSG_WARN([CFLAGS contains -O0 which may conflict with \
--enable-optimizations. Consider removing -O0 from CFLAGS \
for optimal performance.])
;;
esac
# Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
# compile working code using it and both test_distutils and test_gdb are
# broken when you do manage to get a toolchain that works with it. People
Expand Down
Loading