mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-31354: Let configure --with-lto work on all builds
Allow configure --with-lto to apply to all builds, not just profile-opt builds. Whether this is actually useful or not must be determined by the person building CPython using their own toolchain. My own quick test on x86_64 Debian 9 (gcc 6.3, binutils 2.28) seemed to suggest that it wasn't, but I expect better toolchains can or will exist at some point. The point is to allow it at all.
This commit is contained in:
parent
b3ad0e5127
commit
4c81401b3a
4 changed files with 10 additions and 8 deletions
|
@ -1282,9 +1282,8 @@ else
|
|||
fi
|
||||
|
||||
# Enable LTO flags
|
||||
AC_SUBST(LTOFLAGS)
|
||||
AC_MSG_CHECKING(for --with-lto)
|
||||
AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in PGO builds. Disabled by default.]),
|
||||
AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in any build. Disabled by default.]),
|
||||
[
|
||||
if test "$withval" != no
|
||||
then
|
||||
|
@ -1319,6 +1318,8 @@ if test "$Py_LTO" = 'true' ; then
|
|||
esac
|
||||
;;
|
||||
esac
|
||||
CFLAGS="$CFLAGS $LTOFLAGS"
|
||||
LDFLAGS="$LDFLAGS $LTOFLAGS"
|
||||
fi
|
||||
|
||||
# Enable PGO flags.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue